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 do you mean by recursive stored procedure?
How to achieve Paging of records in SQL SERVER?
Mention the command used to rename the database.
What are the types of sql server?
Do you have any idea about the tcl commands?
What information is maintained within the msdb database?
How to connect a database with sql express.?
What is table level trigger?
where the connection string store in the database
What is 'Join' and explain its various types.
Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?
What is report snapshot?
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
What are the different types of sub-queries?
In how many ways you can invoke ssrs reports?