Temporary Tables in sql server

Published on by LakshmiSaahul,Dhana Royal

Temporary Table:

Temporary tables are tables that are available only to the session that created them.

These tables are automatically destroyed at the termination of the procedure or session that created them.

Use of temporary tables in MS SQL Server is more developer friendly and they are widely used in development. Local temporary tables are visible only in the current session.

Temporary tables are created using the same syntax as a CREATE TABLE except the table name starts with a '#' sign. When the table consists of a single '#' sign, it is defined as a local temporary table and it's scope is limited to the session it is created in.

Advertising
To be informed of the latest articles, subscribe:
Comment on this post