Q&A

Q1:When I tried to use SELECT ... INTO to create a table in a database at work, I got a permissions error. Why?
A1: To execute a SELECT ... INTO statement, the database requires certain options to be set. In addition, you must have permission to read the source table and to create a table in the destination database.
Q2:If I modify a row using a view, does that change the data in the table on which the view is defined?
A2: Yes. A view is simply a way of looking at the original tables. The actual data you see when accessing a view still resides in the standard tables.
Q3:Why should I use a temporary table instead of the original table?
A3: There are several reasons, but the real reason is performance. If you use a table for reference while ...

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.