我有这些疑问:
(SELECT * FROM product WHERE var<>'0'ORDER BY date DESC)
和
(SELECT * FROM product WHERE var='0' ORDER BY date DESC).
当我尝试将两者的结果合二为一时
(SELECT * FROM product WHERE var<>'0'ORDER BY date DESC)
UNION
(SELECT * FROM product WHERE var='0' ORDER BY date DESC)
结果失去了顺序...结果集首先包含所有var不为零的记录,然后是所有var为零的记录,但它们没有按日期排序...特别是顺序有效...为什么?我尝试使用唯一的顺序,但结果混合了 var 等于或不为零的记录...