Mysql 在sql where条件中使用farword斜杠
我试图搜索一个以Mysql 在sql where条件中使用farword斜杠,mysql,sql,where-in,Mysql,Sql,Where In,我试图搜索一个以/开头的元素,下面是查询 我已经试过了 Select id,url from myindex where url='[/]%' ; Select id,url from myindex where url='/%'; 但没有起作用。 有什么建议可以解决这个问题吗?您不需要=。你想要像一样的。第二个是MySQL的发展方向: Select id, url from myindex where url like '/%'; 使用mysql通配符操作符。在你的情况下,试试这个 Se
/
开头的元素,下面是查询
我已经试过了
Select id,url from myindex where url='[/]%' ;
Select id,url from myindex where url='/%';
但没有起作用。有什么建议可以解决这个问题吗?您不需要
=
。你想要像一样的。第二个是MySQL的发展方向:
Select id, url
from myindex
where url like '/%';
使用mysql通配符操作符。在你的情况下,试试这个
Select id,url
from myindex
where url like '/%';
@Amol Solanke你可以这么说这和我的问题不完全一样。但是为什么要投反对票呢?@Amol Solanke我已经尽力了。。这就是为什么我把我已经尝试过的东西放在这里。好的,谢谢。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
Select id,url
from myindex
where url like '/%';