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
You want to use a perspective in an mdx query. How do you select the perspective?
How to list all tables in the database using odbc_tables()?
What is the difference between stored procedure and functions?
Explain the types of indexes.
How to use order by with union operators in ms sql server?
Explain the properties of sub-query in sql server?
How to fine-tune reports?
What is t-sql script to take database offline – take database online.
How to select an exiting database using mssql_select_db()?
What is outer join in sql server joins?
What is a linked server in sql server?
What is query and its types?
How important do you consider cursors or while loops for a transactional database?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
What is dbcc updateusage?