Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sort by sql

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

SQL ORDER BY ASC (Ascending Order)

SELECT *
FROM Customers
ORDER BY age ASC;
Comment

how to ascending order in sql

SELECT *
FROM employees
ORDER BY employees.employee_id DESC ;
Comment

PREVIOUS NEXT
Code Example
Sql :: oracle drop sequence 
Sql :: sql server insert into table 
Sql :: csv into data postgres 
Sql :: mssql dockere 
Sql :: sql row number in result set 
Sql :: sqlalchemy postgres timestamp with timezone 
Sql :: mysql permissions 
Sql :: how to access to mysql without root 
Sql :: sql query for getting data with join and count 
Sql :: mysql remove first and last character from string 
Sql :: alter table add check constraint oracle 
Sql :: insert array postgresql 
Sql :: sql server previous month 
Sql :: select * where id = 1,2,3 
Sql :: sql server create constraint 
Sql :: python simple connect to mysql 
Sql :: increment integer in table sql 
Sql :: postgres update single column 
Sql :: sql server remove primary key without dropping table 
Sql :: setting default value for Boolean data type in SQL 
Sql :: unique key in ms sql server 
Sql :: restore postgresql database from dump file 
Sql :: install latest mysql 8 linux server 
Sql :: sql auto_increment syntax 
Sql :: mysql count rows returned 
Sql :: postgresql must appear in the GROUP BY clause or be used in an aggregate function 
Sql :: sql server create database 
Sql :: grant all privileges database postgres to user 
Sql :: pg_pretty_size 
Sql :: convert dd/mm/yyyy to yyyy-mm-dd in sql server 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =