以下是我的尝试:
SELECT Email FROM members
WHERE RoleId = 5 ORDER BY CreatedAt DESC
SELECT Email FROM members
WHERE RoleId = 5 ORDER BY CreatedAt
SELECT
*
FROM
members
WHERE
CreatedAt = (SELECT MAX(2016-05-10 20:59:06.837) FROM members)
ORDER BY CreatedAt DESC;
答案 0 :(得分:0)
如果你想要今天的所有新行....并且假设你总是填充CreatedAt列并假设它是一个日期时间你会使用这样的东西。
select *
from members
where CreatedAt > convert(date, getdate())