SELECT * FROM (SELECT t.users,t.storageSize,t.storageTime,t.storageUsed,t.status,t.id,t.types,rownumber() over()as rn FROM News t JOIN (SELECT STATUS FROM USER WHERE username='user') u ON LOCATE(t.status,u.status)>0 WHERE t.storageUsed='aa' ) AS a1 WHERE a1.rn BETWEEN 1 AND 10
首先报的 locate function 错误
谁能解决下?
t.status='3'
u.status='3,4,5'
------解决方案--------------------------------------------------------
检查
SELECT t.users,t.storageSize,t.storageTime,t.storageUsed,t.status,t.id,t.types,rownumber() over()as rn FROM News
SELECT STATUS FROM USER WHERE username='sipouser'
中的status的值
------解决方案--------------------------------------------------------
t.status是什么类型 字符串还是数值 ?
------解决方案--------------------------------------------------------