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
Can you name some of the dml commands in sql?
What are subqueries in sql server?
How can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role?
How to provide login information for a new odbc dsn?
What is the advantage of sql server?
Is INSTEAD OF trigger directly applicable to Table ?
Can you edit the .rdl code associated with a linked report?
What is the purpose of sql profiler in sql server? : sql server database administration
How to get a list of table columns using the "sp_columns" stored procedure in ms sql server?
What are the differences between left join and inner join in sql server?
Explain the purpose of indexes?
What is the most common trace flags used with sql server?
What is difference between inner join and join?
Comment,Datatypes are unlimited
What are the differences between user defined functions and stored procedures?