2016年1月27日 星期三

SQL SELECT WHERE NOT EXISTS

SQL SELECT WHERE NOT EXISTS


找出t_SYS_User資料表中,與t_SYS_Group之間沒有相關連的資料

  SELECT * FROM (

 SELECT docno,name,ename,goid FROM t_SYS_User

  ) u
  WHERE NOT EXISTS (

      SELECT oid FROM t_SYS_Group

   WHERE oid=u.goid
  )

1 則留言:

  1. Thank you for this article. Personally, I think this material is great. I agree with much of your information here. It also motivates me to learn more. I await the next article with great anticipation.The name is given, probably as a result of [genghis khan]'s mongol empire, which saw mongols breed with the natives of most asian races/tribes. The key factors in deciding whether a skull is goid or not lie in the eyes and nose.

    回覆刪除