??
ID除前10条的内容
->也就是从第11条开始取??SELECT * FORM thread WHERE tag='a' AND tag='b' ORDER BY id LIMIT 10,9999999;ID最后10个SELECT * FORM thread WHERE tag='a' AND tag='b' ORDER BY id DESC LIMIT 10;Limit 的作用方法
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=31837不知这样是不是你所要的结果????
ID除前10条的内容
->也就是从第11条开始取??SELECT * FORM thread WHERE tag='a' AND tag='b' ORDER BY id LIMIT 10,9999999;ID最后10个SELECT * FORM thread WHERE tag='a' AND tag='b' ORDER BY id DESC LIMIT 10;Limit 的作用方法
http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=31837不知这样是不是你所要的结果????
我现在想列出所有tag=a的内容和" tag=b除前10条的内容(ID最后10个)", <---我只要tag=b的从第11条到最后, tag=a要全部...
UNION
SELECT * FORM thread WHERE tag='b' LIMIT 10,9999999;
SQL 语句 : SELECT * FROM `thread` WHERE tag='normal'
UNION
SELECT * FROM `thread` WHERE tag='post' LIMIT 0, 30MySQL 返回:
You have an error in your SQL syntax near 'UNION
SELECT * FROM `thread` WHERE tag='post' LIMIT 0, 30' at line 2
UNION你应该使用 MySQL 4.0.0 以上版本!