SQL - Structured Query Language

SELECT - AS (or) Assignment Operator

PRINT and SELECT statements are used to display some thing in the query output window. SQL Server allows you to define specific header name(s) of query result set by using AS or Equal = operator. An example, the following queries are used to displays SELECT query result set with unique segment column names PRODUCT Table.

-- Example 23 --


SELECT Product_Name = Prod_Name FROM Product


SELECT 'Product Name' = Prod_Name FROM Product


SELECT 'Product Information' = Prod_Code + ' ' + Prod_Name FROM Product

Query Output Screen

* * * * *

Email Your Comment To AUTHOR