這裏是我的簡單查詢:SQLite的查詢結合使用兩個結果集,
Select user_id, body
from Messages where (Messages.author = 'john' and Messages.receipt = 'erick'
UNION ALL (Messages.author = 'erick' and Messages.receipt = 'john');
我只是想給這兩個簡單的SELECT查詢相結合,得到的東西,如:
user_id body
------------------
1 hello
2 hi john
2 hello this is erick
1 this is john!
我在做什麼錯?