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 list

ORDER BY FIELD(id, 3, 11, 7, 1)
Comment

MySQL Order By

SELECT * FROM demo ORDER BY Hint
Comment

MySQL Order By Desc

SELECT * FROM demo ORDER BY Hint DESC
Comment

PREVIOUS NEXT
Code Example
Sql :: date format in sql 
Sql :: change postgress password 
Sql :: find duplicate keys in mysql 
Sql :: check if record exists mysql 
Sql :: SQL Server Get the current identity value of the table 
Sql :: where date = max(date) in sql 
Sql :: join update query in sql 
Sql :: what is integrity constraints 
Sql :: get comma separated values in sql server 
Sql :: install mysql in ubuntu 
Sql :: mysql ifnull 
Sql :: drop table with constraints 
Sql :: execute stored procedure 
Sql :: mysql add text to existing field 
Sql :: insert output identity 
Sql :: how to unlock table in sql server 
Sql :: mysql database create 
Sql :: pl/sql cursor 
Sql :: How to check event scheduler status mysql 
Sql :: alter column to null 
Sql :: like in mysql 
Sql :: create_engine sqlalchemy with parsed url sql server 
Sql :: sql get the name of user pc 
Sql :: sql case 
Sql :: oracle sql select all days between two dates except weekends 
Sql :: mysql alter add foreign key 
Sql :: oracle revoke grant 
Sql :: update with join 
Sql :: sqlalchemy return id after insert 
Sql :: mysql 1 hour ago 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =