我有以下SELECT
声明,我需要添加ORDER BY [UserName]
.
SELECT *
FROM [UserInfo]
WHERE ([AWSAccountID] = CASE WHEN @AWSAccountID = -1 THEN [AWSAccountID]
ELSE @AWSAccountID END)
ORDER BY
假设可以添加它,我在确定需要去哪里时遇到了一些麻烦。
我有以下SELECT
声明,我需要添加ORDER BY [UserName]
.
SELECT *
FROM [UserInfo]
WHERE ([AWSAccountID] = CASE WHEN @AWSAccountID = -1 THEN [AWSAccountID]
ELSE @AWSAccountID END)
ORDER BY
假设可以添加它,我在确定需要去哪里时遇到了一些麻烦。