我需要在SQL Server中使用ORDER BY子句2008例如訂購SQL Server中的條款更新詢問
Update tblTempChek Set TmpCheckIn='15:50:03'
Where TempID IN (
Select TempID
From tblTempChek
Where convert(date, TmpDate)='2015-06-23' AND UserID='1'
Order By TempID Desc
)
更新表,但是這給了錯誤
Msg 1033, Level 15, State 1, Line 3
The ORDER BY clause is invalid in views, inline functions, derived tables, subqueries, and common table expressions, unless TOP or FOR XML is also specified.
問題是:爲什麼? – dario
它只是需要更新tblTempChek – Waqas
使用順序更新表沒有意義。 – dario