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
If user is owning any SQL Objects, can we drop that user
Disadvantages of the indexes?
Explain iaas, paas and saas?
How do you delete duplicate rows in sql server?
How to get a list of columns in a view using the "sp_help" stored procedure?
What command is used to delete a table from the database in the sql server and how?
What are constraints in microsoft sql server?
What is the sql server agent?
What is a trace frag?
What is cached report?
What are three major types of constraints?
if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration
What is GUID in sql server?
What are the main sources of data?
Can we insert data into view sql server?