Thursday, 29 May 2014

Temp table Limitation

Temp tables are constructs which exist for a limited time in SQL Server, usually the lifetime of a connection. There are a few restrictions for temp tables, like they cannot be partitioned and cannot have FKs. They can have indexes and constraints. 

  • Temporary tables cannot be partitioned
  • Temporary tables cannot reference or be referenced by FOREIGN KEY constraints
  • When a session creates temporary table that contains a named constraint inside a transaction, another sessions cannot create a temporary table of the same name until the first session commits the transaction.

No comments:

Post a Comment