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
What are the different types of triggers in SQL SERVER?
Explain differentiate between a having clause and a where clause?
What is a sql join?
Describe the functionalities that views support.
What is partition in sql server?
Explain nested trigger in sql?
how many type of indexing in database?
Define compound operators?
What is inner join in sql server joins?
What are the aggregate and scalar functions?
What is the difference between nvl and nvl2?
can you instantiate a com object by using t-sql? : Sql server database administration
How to send a ssrs report from ssis?
what is bit datatype? : Sql server database administration
Write a query to include a constraint, to check whether the employee salary is greater than 5000?