删除除白沙外的所有行数据:
delete from 表名 where 字段名 <>'白沙'
删除除白沙、北京外的数据:
delete from 表名 where 字段名 not in('白沙','北京')
或者
delete from 表名 where 字段名 <>'白沙' and 字段名<>'北京'
删除除白沙外
delete from test where address <> '白沙'
删除除白沙,北京外
delete from test where address <> '白沙' or address <> '北京'
或者
delete from test where address not in ('白沙','北京')
表名test 白沙那一列为address
delete from test where address <>'白沙'
补:
那就在后面再加一个条件
delete from test where address <>'白沙' and address<>'北京'
delete from 表名 where 字段名 <>'白沙' and 字段名<>'北京'
delete test where address<>'白沙' or address<>'北京'