6.多表联合查询,去除重复

 

去除重复数据:

语法规则:在select 后加上distinct,就会去除重复。

select distinct book.author,book.title,borrow.BID,student.stuName,student.major from book 
inner join borrow on book.BID=borrow.BID 
inner join student on student.stuID=borrow.stuID order by BID Desc

 

posted @ 2016-10-27 10:23  狼牙者.net  阅读(3501)  评论(0)    收藏  举报