| Use Query Analyzer or SQL Server Management Studio to create and execute a new query, and view the results.
|
|
Answers
| This query returns 996 rows. All columns are returned for all rows in the Contact table. |
| Insert a row using generated SQL script:
|
|
Answers
| The modified script should resemble the following:
INSERT INTO [AdventureWorks2000].[dbo].[ProductCategory] ([Name], [ModifedDate], [rowguid]) VALUES ('Widget', Default, Default) The INSERT command script contains some unnecessary details that can be eliminated. Using this technique can help you to get started to learn the basic structure of certain Transact-SQL statements. After you've done this a few times, you will likely find it easier to write statements without assistance. Generated script typically uses multi-part object references with names in square brackets to handle spaces and reserved words. The Default key word is used to fill these two columns with the default values specified in the table definition. |