Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to alter fields of all the tables
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01449660
Message ID:
01449661
Vues:
36
>Hi !
>
>Pls help me to alter the data type of a field of all the tables exist in the SQL Database.
>
>Thanks In Advance
>Ravi

In ALL tables you have the same field?
Try this:
USE YourDataBase
GO
EXEC sp_MSForEachTable 'ALTER TABLE ? ALTER COLUMN TheNameOfTheColumn (rest of the ALTER COLUMN syntax)'
GO
NOT TESTED!
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform