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
Can a unique index be created on a column, which contains null?
What is microsoft sql server?
What is the difference between a view and a stored procedure?
How much does sql server 2016 cost?
What is a view in sql?
How do you size a resultset?
What is the purpose of self join?
Can we call stored procedure in trigger?
How to use union to merge outputs from two queries together in ms sql server?
What are the parts of a function?
What is the difference between Clustered and Non-Clustered Index?
Tell me the use of keyword with encryption. Create a store procedure with encryption?
How to perform key word search in tables?
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?
How to rebuild master databse?