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 :: rename a column in sql server 
Sql :: AND OR NOT operators sql 
Sql :: mysql date equals to current_date plus days 
Sql :: regenerate assets odoo 
Sql :: error code 1215 cannot add foreign key constraint 
Sql :: select top 3 sql 
Sql :: get all columns in a table sql 
Sql :: sql log file inof 
Sql :: count number of entires by months sql 
Sql :: sql insert column 
Sql :: mysql repeated values 
Sql :: mysql create procedure phpmyadmin 
Sql :: mysql create table from select statement 
Sql :: sql server select furst day of current year 
Sql :: sql view talbe columns 
Sql :: htaccess allow index 
Sql :: mysql dump with table query 
Sql :: how to delete all duplicate items in mysql 
Sql :: How to insert data in mysql ? 
Sql :: /bin/sh: 1: mysql_config: not found 
Sql :: second highest salary in sql 
Sql :: mysql where length greater than 
Sql :: eliminar ultimo carcacter mysql 
Sql :: import mysql dump database command line linux 
Sql :: sql select where 
Sql :: database stuck on restoring 
Sql :: insert query in sql 
Sql :: oracle ddl 
Sql :: mysql datetime format 
Sql :: postgresql create table as select 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =