Temporary Table in SQL Server
How can i make temporary tables in SQL?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Shivanand ArurPosted Sep 21, 2012, 8:29 AM
(
param1 int,
param2 varchar(20)
)
To create a temporary table, use the "#" and then the table name... But with this, the tmp table will be destroyed once the session is complete... Instead you can create a Global Temporary Table like this...
CREATE TABLE ##tmp
(
param1 int,
param2 varchar(20)
)
For More Reference... Check out these articles..
http://www.sqldbadiaries.com/2011/01/07/sql-server-does-not-start-fcbopen-operating-system-error-3the-system-cannot-find-the-path-specified/
http://blog.sqlauthority.com/2007/10/31/sql-server-importance-of-master-database-for-sql-server-startup/
http://stackoverflow.com/questions/3498256/physical-database-and-log-file-location
http://www.trainsignal.com/blog/understanding-microsoft-sql-server-2005-system-databases
http://programming4.us/database/1970.aspx
Thank you.
Pradip PandeyPosted Sep 21, 2012, 6:35 AM
Creating a temporary table in SQL is very simple and you can create 2 types of temporary tables.Here is the example for creating a local temporary table in SQL
GO
For Creating a global temporary table use ## sign in place of #.
Hope it will help.