Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张这样的桌子
Words | count hello | 2 bye | 1 good-bye| 2
如何删除/忽略包含连字符的行(我认为使用正则表达式)?所以输出是
hello | 2 bye | 1
最简单的解决方案是使用LIKE
LIKE
SELECT * FROM TableName WHERE words NOT LIKE '%-%'
使用不喜欢
where words not like '%-%'
SELECT * FROM Table NOT REGEXP /*-*/;