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 / madhu sudhan g
Hiiii
in Stored Procedures we cannot create same temp table twice if it is in IF else conditions also
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the distinction amongst delete and truncate?
Differentiate between mongodb vs. Sql server?
How do you size a resultset?
When to use Inner join & when to use subquery?
What is attribute hierarchy? : sql server analysis services, ssas
Explain the etl (extraction, transformation, and loading)?
what are the new features introduced in sql server 2000? : Sql server database administration
Why de-normalization required?
Explain the concepts and capabilities of sql server?
What command is used to delete a table from the database in the sql server and how?
What is fill factor and pad index?
What are policy management terms?
Can sub report data source be different from that of the parent report?
in the physical file layout, where should the transaction log be stored in relation to the data file?
What is Transparent Data Encryption?