Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / soorai ganesh

Problem in #temp table. Because it comes twice in SP.
(U can say it is in else part. But compiler will not accept
this.First it will compile everthing then running the SP. )

Its better to keep another name for Else part table.......

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between views and tables?

994


How to rebuild master databse?

1071


How to concatenate two character strings together?

1109


How can you start sql server in different modes?

961


How to create view in stored procedure sql server?

1006


What is difference between rollback immediate and with no_wait during alter database?

1077


what is the primary use of the model database? : Sql server administration

1033


Why does sql studio use a single registered database repository? : sql server management studio

987


What is the difference between online clustering and Offline clustering?

2402


What is cdc in sql server?

989


Explain the microsoft sql server delete command?

1006


what is a sub-report?

140


How do I port a number to sql server?

1029


How do you implement session management in SQL Server mode?

1084


What is a synonym for manipulation?

979