Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql as

Renames a table or column with an alias value which only exists for the
duration of the query.
Example: Aliases north_east_user_subscriptions column
SELECT north_east_user_subscriptions AS ne_subs
FROM users
WHERE ne_subs > 5;
Comment

sql as

SELECT CustomerID AS ID, CustomerName AS Customer
Comment

sql as

-- AS is a keyword that allows you to rename a column or table using an alias
SELECT column_name AS 'Alias'
FROM table_name;
Comment

sql as

SELECT NAME AS "Employee Name" FROM PEOPLE;

SELECT p.NAME AS "Employee Name", s.SALARY 
FROM PEOPLE p
JOIN SALARIES s ON p.ID = s.ID;
Comment

PREVIOUS NEXT
Code Example
Sql :: sql limit to 5 results 
Sql :: timestamp sql 
Sql :: add column mysql with foreign key 
Sql :: while in sql server 
Sql :: declare variable in mysql 
Sql :: select only distinct values another table 
Sql :: get month sql 
Sql :: mysql count 
Sql :: having in sql 
Sql :: mysql search multiple tables 
Sql :: changing column names in sql query results 
Sql :: add sqlite3 in lumen 
Sql :: sql select like 
Sql :: how to check which table has data in mysql 
Sql :: md5 encode oracle 
Sql :: SQL division of an integer by another integer get float CAST 
Sql :: how to average max mysql 
Sql :: query inner join 
Sql :: tsql from yyyymm to date 
Sql :: create atable copy in pgsql 
Sql :: macos oracle docker oracle11g 
Sql :: docker use mysql 
Sql :: sql join on wildcard 
Sql :: postgres copy table 
Sql :: mysql copy row with new id 
Sql :: list all functions and procedures in postgres query 
Sql :: how to select only a certain date sql 
Sql :: how to update rows from a table when certain conditions are met in mysql 
Sql :: mysql update LAST_INSERT_ID() 
Sql :: laravel subquery in from clause 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =