首页 > 数据库技术 > 详细

mysql 中的 not like 另一种简化方法。

时间:2017-08-07 18:04:21      阅读:314      评论:0      收藏:0      [点我收藏+]

第一种 not like 方法

select * from table where `zongbu` not like ‘%北京%‘ and `zongbu` not like ‘%上海%‘ and `zongbu` not like ‘%深圳%‘ and `zongbu` not like ‘天津‘ and `zongbu` not like ‘香港‘ and `zongbu` not like ‘沈阳‘

第二种 not like 方法

SELECT * FROM table WHERE zongbu NOT REGEXP ‘北京|上海|深圳|天津|香港|沈阳‘;

mysql 中的 not like 另一种简化方法。

原文:http://www.cnblogs.com/wjm956/p/7300399.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!