Day 10

Quiz

1:What are the three different types of temporary tables and how do you create them?
A1: Local temporary tables are created with a single # symbol as the first character in the table name; global temporary tables are created with two # symbols; permanent temporary tables are created by creating the table in the TEMPDB database.
2:If I need to append 10 tables together, how can I do it?
A2: You would create a view with 10 SELECT statements that are joined together using a UNION clause. This will work only if all the tables have the same number and type of columns.
3:Who can access a global temporary table? A permanent temporary table?
A3: Global temporary tables can be accessed by anyone connected to the server. Permanent temporary tables ...

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.