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 updatable resultset?
How do we know if any query is retrieving a large amount of data or very little data?
How to set database to be read_only in ms sql server?
Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
Explain ms sql server reporting services vs crystal reports?
what are acid properties? : Sql server database administration
Explain the steps to use transact-sql cursor?
Which is faster statement or preparedstatement?
Explain time data type in sal server 2008?
What are scalar functions in sql?
Can we use having clause without group by?
what data regions are and what are the different data regions?
Explain activity monitors
What are the common performance issues in sql server?
When to use null data driven subscription?