0
我有查詢將從列返回不同的日期[InsertDate]從獲得最大的子查詢日期 - SQL SERVER
SELECT DISTINCT [InsertDate] FROM cust
現在我想從該查詢返回的結果最大日期。這裏的查詢,但沒有奏效
SELECT max(SELECT DISTINCT [InsertDate] FROM cust) from cust
例子: 2015年12月1日 2016年1月1日
結果: 2016年1月1日
'從cust' –
SELECT MAX([InsertDate])'SELECT TOP 1 [InsertDate]從CUST排序InsertDate desc' –