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
Why use view instead of a table?
What is create command?
What is the standby server?
What is read uncmmited?
Scalability, Availability, Integration with internet, etc.)?
How to filter records of table in SQL SERVER?
What is the template in sql?
Is sql server 2016 free?
Explain intellisense for query editing
What is the difference between function and stored procedure in sql server?
What is federation member?
Find nth lowest salary or get nth lowest salary?
what is a self join? : Sql server database administration
Explain about thread and memory management process of SQL?
What is similarity and difference between truncate and delete in sql?