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 is sqlservr.exe - process - sql server (sqlex?press)?
What are the steps you should follow to start sql server in single-user mode?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
Explain in details security in SQL azure?
what is a default tcp/ip socket assigned for sql server? : Sql server database administration
What is data source object?
What are information schema views?
What are the restraints imposed on the table design by a merge replication?
What is the recursive stored procedure in sql server?
How you can get a list of all the table constraints in a database?
How to integrate the ssrs reports in application?
Why we use trigger in sql server with example?
What is instead of dml trigger?
Mention the uses of stored procedures.
Explain the disadvantages/limitation of the cursor?