摘要: SQL模式匹配允许你使用“_”匹配任何单个字符,而“%”匹配任意数目字符(包括零字符)。在 MySQL中,SQL的模式默认是忽略大小写的。下面给出一些例子。注意使用SQL模式时,不能使用=或!=;而应使用LIKE或NOT LIKE比较操作符。 1.要想找出以“b”开头的id:select * from userinfo where userid like 'b%';2.要想找出以“b”结尾的idselect * from userinfo where userid like '%b';3.要想找出包含“b”的id:select * from userinfo w 阅读全文
posted @ 2013-08-05 09:44 cnbing 阅读(293) 评论(0) 推荐(0)