這是綁定到我的DataList中的SQL查詢。你能告訴我如何以隨機順序返回數據嗎?如何使用SQL查詢以隨機順序顯示數據
SELECT
CONVERT(varchar(6), a.lastdate, 6) as lastdate, *
FROM
alz_jobpost AS a
INNER JOIN
(SELECT *
FROM alzome_SuperAdmin AS b
INNER JOIN alzome_Renewal AS c ON b.S_id = c.supid
WHERE c.product = 'HI-TOUCH' AND c.Payed = 1) AS aa ON a.oid=aa.businessid
WHERE
a.status = 1
AND a.lastdate > GETDATE()
ORDER BY
a.startdate DESC
對不起,我不知道你是什麼試圖實現。你想讓這個查詢返回隨機結果嗎?或者你想以隨機順序嗎? – 2013-03-07 08:58:58
以startdate命令的數據隨機順序也由dsc訂購 – 2013-03-07 09:05:27
對不起,我還不清楚。你想以隨機順序嗎?但是你說你想通過StartDate訂購?這是不可能是隨機的,並在同一時間訂購。 – 2013-03-07 09:12:56