Day 1

Quiz

1:How can I tell whether the words I type into the Query Analyzer editor are keywords?
A1: Any words that you enter in the Query Analyzer editor which are keywords will be changed to the color blue. These default colors can be changed in the Options dialog within the Query Analyzer.
2:Identify the column and table names in the following SELECT statement:
select OrderID,
           CustomerID,
           OrderDate,
           ShipName,
           ShippedDate
From Orders
A2: The columns in the SELECT statement are all listed between the SELECT and FROM keywords. The table name follows the FROM keyword.
3:The following query does not work. Why?
Select * Employees
A3: The SELECT statement requires the keyword FROM before the actual table names.

Exercises

1:Using the Employees table ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.