create procedure proc1 (@a int)
as
begin
if @a=1
create table #temp(a1 int)
else
create table #temp(a1 int)
end
while executeing the above code it shows error
like '#temp already exist' .why it shows an error?
Answer Posted / david
it indicates that some one had already executed the stored
proc but forgotten to delete the temp table they have
created.
normally before closing that particular transaction within
the SP we need to use drop table statement.
| Is This Answer Correct ? | 1 Yes | 10 No |
Post New Answer View All Answers
What happens when unicode strings concatenate with non-unicode strings?
Difference between 2NF &3NF ?
What is default constraint in ms sql server?
if no size is defined while creating the database, what size will the database have? : Sql server administration
How to disable stored procedure sql server?
What is the difference between mysql and sql server?
What are the different authentication modes in sql server?
What are the disadvantages of indexes?
What are sub reports?
How to connect a database with sql express.?
Explain why variables called the most powerful component of ssis?
What are the different types of cursor?
How do you drop an index?
Is natural join and equi join same?
Does partitioning ssd reduce performance?