出现了这个错误,原因是内层select语句带有limit子句。
原来的sql为:
SELECT uid, open_acc_status, open_acc_time, mobile_num, email, reg_type FROM UserInfo WHERE uid IN (SELECT uid FROM InviteCode WHERE invite_uid = 100000004 LIMIT 1 OFFSET 1)
这样的sql语句存在sql语法错误,但是再加一层就行。如:
SELECT uid, open_acc_status, open_acc_time, mobile_num, email, reg_type FROM UserInfo WHERE uid IN (SELECT i.uid FROM (SELECT * FROM InviteCode WHERE invite_uid = 100000004 LIMIT 1 OFFSET 1) as i)
在最后的的from table改成 Select * .