Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to sort names in alphabetical order in sql

SELECT id,  
    first_name,
    last_name, 
  FROM customer
  ORDER BY last_name ASC;
Comment

sql order by alphabetical

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

PREVIOUS NEXT
Code Example
Sql :: mysql query first character 
Sql :: sql server: difference between hashtable and table declared using declare keyword 
Sql :: mysql select if empty result 
Sql :: insert query return id mysql 
Sql :: how to see the query of a view in mysql 
Sql :: sql server get schema of table 
Sql :: flask sqlalchemy filter multiple conditions 
Sql :: sql show all users 
Sql :: change row in sql 
Sql :: foreign key mysql 
Sql :: show all database inside postgresql 
Sql :: CONCAT_WS() concat function we can use for adds two or more expressions together with a separator or delimeter. 
Sql :: select last 2 characters sql 
Sql :: Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates. 
Sql :: truncate function in sql oracle 
Sql :: sql trim whitespace 
Sql :: postgresql create query 
Sql :: sqlite truncate tables command 
Sql :: how to change a column name in postgresql 
Sql :: insert current date sql 
Sql :: alter table id autoincrement 
Sql :: download mysql 64 bit 
Sql :: create index mysql 
Sql :: mysql disable query caching 
Sql :: sql date format 
Sql :: mysql copy table to another table 
Sql :: oracle apex warn on unsaved changes 
Sql :: SQL NOT BETWEEN Operator 
Sql :: check index sql server 
Sql :: mysql récupérer le code création de vue 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =