Sequel Pro中,想要实现通配符过滤查询,把手机号是180开头的手机号都查询出来:
想要过滤,手机号是180开头的帐户
试了试:
180*
180%
都不行,直接都不显示了:
sequel pro filter
Use advanced filters in Sequel Pro – David Carr | Web Developer Blog
Sequel Pro Tips: table filters and auto-suggest – Urban Giraffe
sequel pro filter column
sequel pro filter data
[REQ] Allow multiple table content filters · Issue #63 · sequelpro/sequelpro
SELECT * FROM t1 WHERE username LIKE ‘joe%’ OR ( username LIKE ‘jane%’ AND date_joined >= DATE_SUB(NOW(),INTERVAL 3 WEEK) ); or SELECT * FROM t1 WHERE ( username LIKE ‘joe%’ OR username LIKE ‘jane%’ ) AND date_joined >= DATE_SUB(NOW(),INTERVAL 3 WEEK); |
MySQL语法中,倒是用的是百分号
SELECT * FROM table WHERE field1=’a’ AND field2=’b’ |
去试了试:
phone is like "180%”
phone like “180%"
结果都:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘phone like "180%"’ at line 1
【总结】
查询,不论是普通的文字匹配,还是通配符的查询,都可以:
1.用Content中的search
切换到Content中,点击选择对应的列:
输入要查询的内容:
比如,密码为6个1:
111111
再点击Filter,即可过滤出对应的内容:
通配符的话,选择LIKE:
输入180%,即可查询出对应的,180开头的手机号:
-》
对应的还支持其他各种查询语句:
非常好用。
2.Query中手动输入查询语句
去顶部工具栏中Query中,输入SQL查询语句:
SELECT * FROM users WHERE phone LIKE ‘180%’ |
然后点击:
Run Current
就可以过滤显示出我要的值了:
转载请注明:在路上 » 【基本解决】Sequel Pro中设置通配符正则的过滤条件