我对如何编写以下查询有点困惑:
我有两张桌子
tbl_one
ID TEXT
1 test1
2 test2
3 test3
4 test4
5 test5
和
tbl_two
ID userID tblone_ID
1 50 1
2 100 1
3 100 2
我正在寻找未出现在 tbl_two 中但针对特定用户的 tbl_one 行。
例如通过下面的选择:
select * from tbl_one, tbl_two
where (tbl_two.tblone_ID !=tbl_one.ID and tbl_two.userID==50)
我的愿望结果将是
Desire resalt:
ID TEXT
2 test2
3 test3
4 test4
5 test5