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 / utpal chakraboarty
Because, Stored procedure is pre-compiled language.
| Is This Answer Correct ? | 4 Yes | 12 No |
Post New Answer View All Answers
Write a program to fetch first 10 records from a file?
what are cursors? : Sql server database administration
Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you
Do you know what is xpath?
What is the sql case statement used for?
Different types of keys in SQL?
Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?
Can we use trigger new in before insert?
What do you understand by intent locks?
What is standby servers? Explain types of standby servers.
How to create a store procedure with encryption?
How will you decide the active and passive nodes?
What happens if null values are involved in bitwise operations?
What are the underflow and overflow behaviors on float literals?
Determine when to use stored procedure to complete sql server tasks?