1

这是绑定到我的 DataList 的 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
4

1 回答 1

2

要以随机顺序获取结果,您可以更改:

ORDER BY a.startdate DESC

类似于:

ORDER BY NEWID()

于 2013-03-07T09:16:01.203 回答