MySQL 模糊查询和清空某表

mysql的通配符是 %
where tel like '137%' 查以137 开头的
where tel like '%137'查以137 结尾头的
where tel like '%137%' 只要包含137的都查出来

-- 模糊查询包含的字符串
SELECT * FROM table where column like '%string%'

-- 模糊查询不包含的字符串
SELECT * FROM table where column not like '%string%'
-- 清空指定的表
truncate table dede_arctiny;
truncate table dede_archives;
truncate table dede_addonarticle;

猜你喜欢

转载自onestopweb.iteye.com/blog/2304652
今日推荐