0

I have a table which stores user login ID. Now i want to display information so tat the logged in user's ID should be on top and other should be at the bottom. For exapmle if the user ID is 3 then all the records with 3 should appear first and other records should follow the list.. How do I do this?

1 Answer 1

2
... ORDER BY CASE WHEN user_id = 3 THEN 1 ELSE 2 END ... 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.