执行以下语句后:
SELECT Category FROM MonitoringJob ORDER BY CreationDate DESC
Run Code Online (Sandbox Code Playgroud)
我从数据库中获取以下值:
test3
test3
bildung
test4
test3
test2
test1
Run Code Online (Sandbox Code Playgroud)
但我希望删除重复项,如下所示:
bildung
test4
test3
test2
test1
Run Code Online (Sandbox Code Playgroud)
我尝试使用DISTINCT,但它在一个语句中不能与ORDER BY一起使用.请帮忙.
重要:
我尝试过:
SELECT DISTINCT Category FROM MonitoringJob ORDER BY CreationDate DESC
Run Code Online (Sandbox Code Playgroud)
它不起作用.
CreationDate的订单非常重要.