March 2001
Intermediate to advanced
640 pages
14h 9m
English
As you use T-SQL to perform more complex processing, you will sometimes need to temporarily save data that you have selected so that you can work with and possibly modify it. This is done using temporary tables. Temporary tables exist, as their name implies, for a limited amount of time. Temporary tables come in three variations: local, global, and permanent. All temporary tables are created in the TEMPDB database, no matter which database you are using when you create it.
Whenever you are processing a query, the SQL Server usually creates temporary tables behind the scenes as needed. When you use ORDER BY and the data you are sorting does not have an index associated with it, the server will use a temporary ...
Read now
Unlock full access