The syntax to create a temporary table is exactly same as the syntax to create a normal table. But the difference is the table name is prefixed with '#' (pound). By looking at the prefix '#' the sql server understands that it is a temporary table. The following code demonstrates how to create a temporary variable.
CREATE TABLE #Customer ( CustomerID int identity(1,1), CustomerName varchar(100), CompanyName varchar(100), Address varchar(250) )
Important points about temporary tables: It is a...
No comments yet, be the first one to post comment.