Skip to content
Advertisement

How to get the SQL result in reverse from the columns in SQL

I have been asked a question in an interview.

Sample table named test:

Desired output:

How to to get the desired output?

Advertisement

Answer

You just need to use order by on column B ASC|DESC

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement