熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Oracle >> 正文

左連接查詢的思考

2013-11-13 22:08:38  來源: Oracle 

  左連接查詢

  select  uGroup_IduGroup_NamelUser_IdlPosition_Id

  from usergroup u

  left join (select * from UserGroupLink where User_Id=admin and company_id=) as l  on uGroup_Id=lGroup_Id;

  as可以省略

  注意寫成以下這樣就不可以了

  select  uGroup_IduGroup_NamelUser_IdlPosition_Id

  from usergroup u

  left join select  * from  (select * from UserGroupLink where User_Id=admin and company_id=) as l  on uGroup_Id=lGroup_Id;


From:http://tw.wingwit.com/Article/program/Oracle/201311/18324.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.