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
How do I open a .db file?
How are the exceptions handled in sql server programming?
What happens if an integer is too big for int date type?
What is 3nf normalization?
How to select all columns of all rows from a table with a select statement in ms sql server?
List all types of constraints in sql server?
When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?
What are the High-Availability solutions in SQL Server and differentiate them briefly?
What are different types of data sources?
How to use transact-sql statements to access the database engine?
How data can be copied from one table to another table?
What are pages and extents? : SQL Server Architecture
What is temporary stored procedure?
What happens if time-only values are provided as date and time literals?
Explain iaas, paas and saas?