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
Explain the etl (extraction, transformation, and loading)?
What are types of storage modes? : sql server analysis services, ssas
What is data source in connection string?
Using the customer, and order table in northwind database, please write a query to produce xml?
What are different types of schemas?
Please explain go command in sql server?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?
What are the key configuration files for sql server reporting services ?
What do you mean by data integrity?
How can you find out how many rows returned in a cursor?
Explain cursor as data base object?
What is replace and stuff function in sql server?
can you implement data mining in SSRS?
What does this statement do @@rowcount?
What is Replication?