Elements of the SELECT statement
Retrieving columns from a table or view
Use SELECT with column list to display columns
Use FROM to specify a source table or view
Specify both schema and table names
Delimit names if necessary
End all statements with a semicolon
SELECT CustomerID, StoreID
FROM Sales.Customer ;
Using calculations in the SELECT clause
Calculations are scalar, returning one value per row
Using scalar expressions in the SELECT clause
SELECT unitprice, OrderQty, (unitprice * OrderQty)
FROM sales.salesorderdetail ;
0 Comments