Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sort by mysql

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;		-- col1 DESC then col2 ASC
Source by www.mysqltutorial.org #
 
PREVIOUS NEXT
Tagged: #sort #mysql
ADD COMMENT
Topic
Name
7+1 =