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 / lee
yep problem is with the compiler.. I had to think of
another way to solve the problem, eg, I created the #temp
without the IF statement and then used an IF ELSE statement
to modify or update #temp, make sense?
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is cdc in sql server?
How to create view in stored procedure sql server?
What are sql azure firewall rules?
How to create a stored procedure with a statement block in ms sql server?
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
What is SQL Azure Fabric?
What is the stuff?
what is normalization? : Sql server database administration
What is primary key and example?
Can you please differentiate between a primary key and a unique key?
What is enhanced database mirroring in sql server 2008?
What is abstracting periodical?
Is INSTEAD OF trigger directly applicable to Table ?
Explain the stored procedure?
Explain the Ways to improve the performance of a sql azure database?