Home > Database > MS SQL Server > how to order by number and string in SQL Query

how to order by number and string in SQL Query

If you want to apply order by on column which contains data likes numbers, string..etc
 
Then here is the solution

 

Input:-
a
ba
ab
1
as
2   
 
Output:-
1
2
a
ab
as
ba
 
 
🙂
 
This Article is TAGGED in , , , . BOOKMARK THE permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">