Now before using this statement in your SQL always place a check if table already exists in TempDB. I hope this article will help you achieving all the basics operations with Temporary tables.ĬREATE TABLE #Mytemp (Col1 nvarchar (100 ), Col2 int ) In this article we'll see how to use the Temporary tables and what are the necessary steps to be taken while using them and moreover sometimes it's required to add a column in Temporary tables dynamically. To do that there are options available in SQL Server you can use Cursors, #Temp tables or Table variables. While creating a stored procedure it's often necessary to create temporary tables to hold temporary operational data.
0 Comments
Leave a Reply. |