Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql order

SELECT column_name(s) FROM table_name ORDER BY column_name(s) ASC|DESC 
Comment

ascending order mysql

  
 SELECT 
   column_name1, column_name2, column_name3
FROM 
   table_name
ORDER BY 
   column_name1 [ASC|DESC], 
   column_name2 [ASC|DESC],
   ...;
Comment

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
Comment

mysql order by

To get the sorted result from MySQL select statement we use order by clause with SELECT statement.

Syntax:
SELECT column_list FROM tablename ORDER BY column_name1 [ASC][DESC],column_name2 [ASC][DESC],...
Comment

MySQL ORDER BY

SELECT 
   select_list
FROM 
   table_name
ORDER BY 
   column1 [ASC|DESC], 
   column2 [ASC|DESC],
   ...;
Comment

MYSQL ORDER BY

SELECT * FROM adminra_RepAda.customerServiceRequests order by insertDate DESC;
Comment

MySQL Order By

SELECT * FROM demo ORDER BY Hint
Comment

PREVIOUS NEXT
Code Example
Sql :: Converting mysql tables to charset utf8mb4 
Sql :: rename column in table sql 
Sql :: sql server phone constraint 
Sql :: sql number columns 
Sql :: how to load files in mysql 
Sql :: Create boolean column in MySQL with false as default value? 
Sql :: how to add month in update sql 
Sql :: oracle list proxy users 
Sql :: groupby error in mysql 
Sql :: postgresql import data from csv 
Sql :: update trigger 
Sql :: mysql min value row 
Sql :: dba_dependencies 
Sql :: mysql utc to local time 
Sql :: list table columns sql 
Sql :: sql get duplicates by composite 
Sql :: invalid column name sql 
Sql :: c# select Mysql 
Sql :: mysql loop 
Sql :: delete top 10 rows in sql 
Sql :: 2nd max salary query in sql 
Sql :: print hello world in sql 
Sql :: oracle select invalid views 
Sql :: mongodb vs mysql 
Sql :: sql last time database was accessed 
Sql :: auto increment in postgresql 
Sql :: oracle all dates between two dates 
Sql :: add column alter table default value 
Sql :: mysql in 
Sql :: substring sql 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =