Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating alter table script
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Creating alter table script
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01346196
Message ID:
01346196
Vues:
53
Hi everybody,

With this select
select Table_Name, Column_Name, Data_Type, Character_Maximum_Length from information_schema.columns where Character_Maximum_Length >=100 order by 1,2

I can get a list of all potentially dangerous fields. Now I want to write a procedure to generate a script to change all of these fields to varchar(100) (not execute it, of course).

How should I proceed in writting such code?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform