Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Friends,
I have created temporary table in my project and it works, that is when I runs it. But I do not know much about temporary tables.
I would like to know if that is all that it takes to create temporary tables. I also would like to know if I can use stored procedure to execute the temporary table when I want to insert data into the tables from the front end application.

If there's more to it I will be willing to know.
Any assistance will be helpful.

This the actual table that I will be creating the temporary table for.
SQL
CREATE TABLE ITEMCODE_REGISTRATION 
( 
	ITEMCODE NVARCHAR(20)NOT NULL,
	ITEMNAME CHAR(50)NOT NULL,
	CATEGORY CHAR(25)NOT NULL
)

Please this is the temporary table I created
--Temporary table
SQL
CREATE TABLE #ITEMCODE_REGISTRATION 
( 
	ITEMCODE NVARCHAR(20)NOT NULL,
	ITEMNAME CHAR(50)NOT NULL,
	CATEGORY CHAR(25)NOT NULL
)


Thanks.
Posted
Updated 13-Aug-13 10:54am
v3
Comments
Maciej Los 13-Aug-13 8:30am    
And a question is...

1 solution

Temporary tables usually are used to store data only for short time to perform some operation, like pivots, aggregates, etc.

For further information, please see:
Special Table Types[^]
Creating and Modifying Table Basics[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900