日期:2014-05-18  浏览次数:20498 次

这句话什么意思?
SQL code
select * from Status where Status<>'1' and Status<>'2' 

<>这符号是什么意思?

------解决方案--------------------
select * from Status where Status<>'1' and Status<>'2' 

不等于1并且不等于2

可改为:
select * from Status where Status not between '1' and '2' 

select * from Status where Status < '1' or Status > '2' 

------解决方案--------------------
select * from Status where Status<>'1' and Status<>'2'
不等于符号
这句话等价于
select * from Status where Status !='1' and Status !='2'
或者
select * from Status where Status not in('1','2')
------解决方案--------------------
查询出表Status中列Status不等于'1'和'2'所有的记录