我有以下查詢問題與SQL SELECT查詢
SELECT DISTINCT dr.Revision
FROM tblActionHeader ah
INNER JOIN tblActionType at ON at.ActionTypeID = ah.ActionTypeID
INNER JOIN tblDocumentRevisionActionHeader drah ON drah.ActionHeaderID = ah.ActionHeaderID
INNER JOIN tblDocumentRevision dr on dr.DocumentRevisionID = drah.DocumentRevisionID
INNER JOIN tblDocumentHeader dh on dh.DocumentHeaderID = dr.DocumentHeaderID
WHERE at.ActionTypeID=2
UNION SELECT '(All)'
FROM tblActionHeader ah
返回以下結果集
-
(All)
0
0a
1
我需要「(全部)」取於結果的頂部設置如何我可以這樣做嗎?
使用order by子句? – Bert