我正在尝试在表格中进行简单查询,在没有运气的情况下搜索某个位置。
SELECT SUBSTRING(`path`, 40, 40) LIKE '%/%'
FROM files
有人能帮助我吗?
答案 0 :(得分:0)
不应该吗?
SELECT *
FROM files
WHERE SUBSTRING(`path`, 40, 40) LIKE '%/%'
答案 1 :(得分:0)
您可以这样做(如果您知道将要出现的位置,则提供)
SELECT SUBSTRING(`path`, 40, 40) as slashpath FROM files
where SUBSTRING(`path`, 40, 40) LIKE '%/%'
答案 2 :(得分:0)
试试此代码
SELECT SUBSTRING(`path`, 40, 40) path
FROM files
where substring(`path`, 40,40) like '%/%'