0% found this document useful (0 votes)
9 views1 page

SQL - AS Statement - 1keydata

Uploaded by

vickroid007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

SQL - AS Statement - 1keydata

Uploaded by

vickroid007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

3/2/2016 SQL ­ AS Statement | 1Keydata

SQL AS

SQL Data Warehousing CSS PHP HTML Database Normalization

SQL Tutorial Move a Step Ahead in Your


Training on Cloud Computing Career Path with Collabera Enroll N
Basic SQL Commands TACT.
SQL SELECT
SQL DISTINCT
SQL WHERE SQL > SQL Commands > AS
SQL AND OR
In the SQL Alias section, we saw that the syntax for using table and column aliases is as follows:
SQL IN
SQL BETWEEN
SELECT "table_alias"."column_name1" "column_alias"
SQL Wildcard FROM "table_name" "table_alias";
SQL LIKE
SQL ORDER BY The keyword AS is used to assign an alias to the column or a table. It is inserted between the column name and the colum
SQL GROUP BY between the table name and the table alias. The syntax for using AS is as follows:
SQL HAVING
SQL ALIAS SELECT "table_alias"."column_name1" AS "column_alias"
SQL AS FROM "table_name" AS "table_alias";
SQL SELECT UNIQUE
SQL JOIN Let's take a look at the same example as we used in the SQL Alias section. Assume we have the following table, Store_Info
SQL INNER JOIN
SQL OUTER JOIN
Table Store_Information
SQL LEFT OUTER JOIN
Store_Name Sales Txn_Date
SQL CROSS JOIN
Los Angeles 1500 Jan-05-1999
SQL INSERT INTO
San Diego 250 Jan-07-1999
SQL INSERT INTO SELECT
SQL UPDATE Los Angeles 300 Jan-08-1999
SQL DELETE FROM Boston 700 Jan-08-1999

Advanced SQL To find total sales by store using AS as part of the table and column alias, we type in:
SQL UNION
SQL UNION ALL SELECT A1.Store_Name Store, SUM(A1.Sales) AS "Total Sales"
SQL Inline View FROM Store_Information AS A1
SQL INTERSECT GROUP BY A1.Store_Name;
SQL MINUS
SQL LIMIT Result:
SQL TOP
SQL Subquery Store Total Sales
SQL EXISTS Los Angeles 1800
SQL CASE San Diego 250
SQL DECODE Boston 700
SQL AUTO INCREMENT
SQL IDENTITY Is there a difference between between using an alias without AS and with AS in SQL? The answer is no, there is no functio
SEQUENCE & NEXTVAL both versions will accomplish exactly the same thing. The use of AS is simply a more explicit way of mentioning the alias.
SQL Functions
Next: SQL SELECT UNIQUE
SQL Average
SQL COUNT
SQL MAX
SQL MIN
Google Web Hosting
Build Your Online Presence With Google Sites. Free 30­Day Trial!
SQL SUM
SQL ROUND

String Functions
SQL CAST
Copyright © 2016 1keydata.com All Rights Reserved Privacy Policy About Contact
SQL CONVERT
SQL CONCATENATE
SQL SUBSTRING
SQL INSTR
SQL TRIM

http://www.1keydata.com/sql/sql­as.html 1/1

You might also like