Q&A

Q1:Why are table names in stored procedures generated by the wizard preceded with [SmallTownBank].[dbo]?
A1: The first is the database; the second is the database owner. It is possible to access tables in different databases by using these prefixes. In most cases, however, these prefixes are redundant and not used when you write the statements with the help of a wizard.
Q2:What does SET NOCOUNT ON/OFF accomplish?
A2: When SET NOCOUNT is ON, the count indicating the number of rows affected by each SQL statement is not returned. When SET NOCOUNT is OFF, this count is returned. For stored procedures that contain several statements that do not return much actual data, this can provide a significant performance boost because network traffic is ...

Get Sams Teach Yourself Microsoft® Windows® DNA Programming in 21 Days 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.