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 a bit datatype?
explain different types of joins? : Sql server database administration
How to update values in a table with update statements in ms sql server?
What is a trace frag? Where do we use it?
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.
What is the difference between dataadapter and datareader?
Can you tell me some of the common replication dmv's and their use? : sql server replication
What is subquery in sql?
my name is sejal I have cleared the sbi clerk exam. I am BCA graduate My favorite subject RDBMS Relational database management system. so please send me rRDBMS related interview questions
How to add the custom code in Report?
Can sub report data source be different from that of the parent report?
How to query multiple tables jointly?
How to create a view and a stored procedure in ms sql server using "create view/procedure" statements?
what is normalization? Explain different levels of normalization? : Sql server database administration
Differentiate between sql temp table vs table variable?