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
A user is a member of the public role and the sales role. The public role has select permission on all the tables. The sales role does not have select permission on some of the tables will the user be able to select from all tables?
How to trouble shoot if unable to connect SQL Server
What is a result set object returned by mssql_query()?
What is the difference between dbcc indexdefrag and dbcc reindex?
What is resultset concur_updatable?
How to find out what is the default collation in a database?
How to convert a table data in XML format in sql server?
Mention a few common trace flags used with sql server?
What is the guest user account in sql server? What login is it mapped to it? : sql server security
What are the aggregate and scalar functions?
How do you improve the performance of a SQL Azure Database?
What do you mean by subquery?
What is a trigger and types of a trigger?
can SSRS reports Cache results?
What is database replication? What are the different types of replication you can set up in sql server?