Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating alter table script
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Creating alter table script
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01346196
Message ID:
01346196
Views:
52
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
Next
Reply
Map
View

Click here to load this message in the networking platform