An expression consists of any combination of
job_id
qualified with the table name employee
:
employee.job_id
Note In SQL Server, the Query Designer always interprets double quotation marks as database object delimiters. For details, see Query Designer Considerations for SQL Server Databases.
The following table illustrates the use of expressions in a query.
Expression | Result |
---|---|
SELECT (price * .9) |
Displays a discounted price (10% off the value in the price column). |
SELECT (lname + ', ' + fname) |
Displays the concatenated values of the last name and first name columns with a comma between them. |
SELECT sales.qty, titles.price
|
After joining two tables, sorts the |
SELECT au_lname, au_fname |
Displays authors whose area code is in the San Francisco area. |
SELECT ord_num, ord_date |
Finds all orders in the sales table that were made in the last 10 days. Today's date is returned by the GETDATE( ) function. |