2
我有一条没有char_length部分的SQL语句,但是当我在char_length部分添加时,出现了一个SQL错误,表示在第6行有错误。我不确定是什么我做错了。请看看:Char_length在select语句中不起作用
SELECT response, (input LIKE '% one %') as matches
FROM allData
WHERE (char_length(input) >= '10'-(10*.1)
AND char_length(input) <= '10'+(10*.1))
HAVING matches > 0
AND matches = (select max((input LIKE '% one %')) from allData) limit 30;
我假设最后一行应该是'AND matches =(从allData中选择max((input LIKE'%one%'))limit 30' – JThistle