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 is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.
Explain about SQL server 2005?
How to throw custom exception in Stored Procedure?
Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?
How many types of database relationship in sql server?
what are the new features in SSRS?
What are data resources?
Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
What is surrogate key? : sql server analysis services, ssas
How will you monitor replication latency in transactional replication? : sql server replication
How to integrate the ssrs reports in application?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
Which sql server is best?
What are the encryption mechanisms in sql server?
How many ways to create table-valued functions?