Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql order by multiple columns

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 Two Columns

SELECT * FROM demo ORDER BY Hint DESC, Name
Comment

PREVIOUS NEXT
Code Example
Sql :: psql create usr 
Sql :: sql python hwo to pass a list in paramerter 
Sql :: PBI TO SQL 
Sql :: calcular edad en oracle 
Sql :: how to map sql column to custom names 
Sql :: Aktor yang pernah terlibat lebih dari 3 film di sql 
Sql :: findAllBy 
Sql :: mysql exception output 
Sql :: sql query tags 
Sql :: Mysql Install Ubuntu with native password 
Sql :: difference between cross apply and inner join 
Sql :: sqlite closes value 
Sql :: how to restart postgres server on windows 
Sql :: Mysql select all where count more than" 
Sql :: HOW TO RETURN THE NUMBER OF LETTERS IN A cell in mysql 
Sql :: SQL Copy Table Schema Only 
Sql :: sql view postgresql 
Sql :: postgresql inline table 
Sql :: employee sample data mysql 
Sql :: maximum number of tables in mysql 
Sql :: mysql create user if not exists 
Sql :: select from where 
Sql :: Bigquery insert issue 
Sql :: select from 3 tables one is empty 
Sql :: optimize sql query 
Sql :: subquery in Insert 
Sql :: SQL sort on a calculation 
Sql :: backup table mssql 
Sql :: SQL Working With Dates 
Csharp :: c# get current directory 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =