chas2m
Valued Member
Points: 61
More actions
January 7, 2002 at 1:17 pm
#158059
I am trying to add a new column to every user table in my database. Does anyone know the script for this?
Steve Jones - SSC Editor
SSC Guru
Points: 736270
January 7, 2002 at 1:40 pm
#421842
no script I know of. Should be able to build a serise of commands using system views.
select 'alter table ' + table_name + ' add column xxx'
from information_schema.tables
Steve Jones
steve@dkranch.net
jG
SSCrazy
Points: 2505
January 7, 2002 at 2:23 pm
#421848
Try sp_MSforeachtable It is a system sp. -JG
-JG
January 15, 2002 at 1:02 pm
#422212
quote:Try sp_MSforeachtable It is a system sp. -JG
quote:
Thank you very much. That solved my problem!
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply