Temporary Table in SQL Server
How can i make temporary tables in SQL?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Shivanand ArurRank #920 · 2.3K reputationPosted Sep 21, 2012, 4:29 AM EDT
(
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 PandeyRank #452 · 5.6K reputationPosted Sep 21, 2012, 2:35 AM EDT
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.