1
Answer

i do n't under stand the case part of query please help me

chinmaya parija

chinmaya parija

11y
1.2k
1
SELECT id, name, city, ImageName, ImagePath
FROM aaaa
ORDER BY CASE WHEN ID > 0 THEN
(SELECT MAX(ID)
FROM [dbo].[aaaa]) + 1 ELSE ID END, id DESC
 

result
id
0
3
2
1
Answers (1)