Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variables in Select Statements
Message
De
21/09/1999 17:11:00
 
 
À
21/09/1999 13:16:53
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00267214
Message ID:
00267341
Vues:
22
You can use dynamic SQL to do what you want. Try this

USE pubs
DECLARE @tablename varchar(30)
SELECT @tablename = 'authors'
EXECUTE ('SELECT * FROM ' + @tablename)


-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform