Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
i do n't under stand the case part of query please help me
chinmaya parija
11y
1.2k
1
Reply
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
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Index in sql server
how to convert row into colun in sql server ?