Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql sort descending

SELECT * FROM table_name ORDER BY col1 ASC;				-- ASCending is default
SELECT * FROM table_name ORDER BY col1 DESC;			-- DESCending
SELECT * FROM table_name ORDER BY col1 DESC, col2 ASC;	-- col1 DESC then col2 ASC
 
PREVIOUS NEXT
Tagged: #mysql #sort #descending
ADD COMMENT
Topic
Name
2+8 =