Answers for "sql sort varchar as number"

SQL
1

sql sort ages

SELECT q.* 
    FROM (SELECT TOP 3 * 
              FROM table 
              ORDER BY id DESC) q
    ORDER BY q.id ASC
Posted by: Guest on March-19-2020
0

order by number of character in sql

You can also sort or order by the Number of Characters in each Column you wish 
to sort by. Shown below is a sample which sorts by the first three characters 
of the First Name and by the last two characters in the name of the town.

    SELECT *
    FROM table_name
    ORDER BY LEFT(FirstName, 3) ASC, LEFT(Town, 2);
Posted by: Guest on October-01-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language