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 / gaurav
Because temp is being used by database internally so that it
is same as a system table so this table can't create by user...
Is This Answer Correct ? | 1 Yes | 14 No |
Post New Answer View All Answers
What are the 3 types of schema?
Explain the working of sql privileges?
What do you mean by normalisation?
what is a live lock? : Sql server database administration
How do you test your database? : sql server database administration
Differentiate between sql temp table vs table variable?
What does it mean to be in union?
What is the difference between primary key and unique constraints?
You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?
What is cursors? And what are the different types of cursor?
What is openxml in sql server?
Explain throw statement in sql server 2008?
Explain Reporting Life Cycle?
What is normalization of database? What are its benefits?
How to change a login name in ms sql server?