Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop table problem
Message
De
17/02/2005 09:56:45
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00986632
Message ID:
00987916
Vues:
51
Sergey and Jayesh,

You both say that you don't need to drop a #TempTable, but it's good practice to do it. If I'm not mistaken, I think that you *do* have to drop the table, as I thought it persists even after it's gone out of scope.

As an example, in Query Analyzer, I write some code to create a temp table, insert some rows into it, select from it and then drop it ... I run that code all is good. But if I then highlight all the code except the DROP and run it more than once, I get the error "There is already an object named '#temp' in the database."

I guess my question would be then, what "scope" does it have to go out of?

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform