select * from dlcate where cateid =11 order by id
这是一个cateid=11的查询,我想查询除了cateid=11的所有信息怎么写啊?小弟SQL学的不好,请教各位大哥了,不胜感激!!!
select * from dlcate where cateid<>11 order by id
SELECT * FROM dlcate WHERE cateid<>11 ORDER BY id
SELECT * FROM dlcate WHERE cateid NOT IN(11) ORDER BY id
当然第一种效率高些