Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop Temp Table
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Drop Temp Table
Divers
Thread ID:
01429007
Message ID:
01429007
Vues:
120
Why doesn't this work for temp tables?
USE rbp_test
GO

--DROP PROCEDURE sp_DropTable

GO

CREATE PROCEDURE sp_DropTable
	@TableName		VARCHAR(50)
AS


	IF EXISTS 
		(SELECT 1 
			FROM INFORMATION_SCHEMA.TABLES 
			WHERE TABLE_TYPE='BASE TABLE' AND 
				  TABLE_NAME = @TableName) 
		
		BEGIN
		
			DECLARE @Command VARCHAR(100)
			SET @Command = 'DROP TABLE ' + @TableName
		
			EXECUTE (@Command);
		END
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform