As its name indicates, temporary tables are used to store data temporarily and they can perform CRUD (Create, Read, Update, and Delete).
Temp table will not exist once application has been closed.
Temporary tables are dropped when the session that creates the table has closed, or can also be explicitly dropped by users. At the same time, temporary tables can act like physical tables in many ways, which gives us more flexibility. Such as, we can create constraints, indexes, or statistics in these tables. SQL Server provides two types of temporary tables according to their scope:
- Local Temporary Table
- Global Temporary Table
Now, create
a temporary table which has structure similar to production table.
In Back Up, only Schema is copied.
You
can also Drop Temp table from table.
Insert Data into another table using Select statement.
No comments:
Post a Comment