我想从mem_info检索所有记录,但用户名为'qq';
的记录除外以下是我的查询
select * from mem_info where hashtag like '%love%'
EXCEPT select * from mem_info where username='qq';
提前致谢。
答案 0 :(得分:2)
试试这个:
select * from mem_info where hashtag like '%love%' and username <>'qq';
答案 1 :(得分:0)
select * from mem_info where username <> 'qq';
答案 2 :(得分:0)
<强>查询强>
SELECT * FROM mem_info
WHERE hashtag LIKE '%love%'
AND username NOT IN ('qq');