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 / madhu sudhan g

Hiiii


in Stored Procedures we cannot create same temp table twice if it is in IF else conditions also

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain what are commit and rollback in sql?

682


Explain what is sql server english query?

724


What is a subquery in a select query statement in ms sql server?

805


What is the definition for sql server 2000?

788


Explain difference between control flow and data flow?

711






Explain in details security in SQL azure?

115


How many types of keys are there?

733


What is the difference between osql and query analyzer?

714


How to create dbo table in sql server?

689


What are audit control procedures?

748


explain what is raid and what are different types of raid configurations? : Sql server database administration

727


What is mscorsvw.exe - process - microsoft .net framework ngen?

687


What is database black box testing?

766


What is function of master database?

108


What are the advantages of policy management?

749