Groups | Blog | Home
all groups > sql server (microsoft) > june 2005 >

sql server (microsoft) : alter column sql


Jeff Kish
6/16/2005 10:36:53 AM
Hi.

Is there some way to get enterprise manager or query analyzer to tell me the
sql it uses for an alter column operation?

I would just do :

alter table asset alter column asset_number varchar(60)
go

but there are other contraints etcc.

I don't know how to 'cascade' them, and the
alter statement does not seem to work without them.

just trying to assemble a script to write a procedure to invoke when I want to
update a database that requires column lengths to be made longer.

thanks
Jeff Kish
6/16/2005 11:27:15 AM
[quoted text, click to view]
Ahh. I must of been blind. The save script icon became available after I said
"ok" to the change other tables messagebox.
Sorry.
aaron.kempf NO[at]SPAM gmail.com
6/21/2005 6:34:18 PM
yeah.. i think that Access ADP does a little bit better job than
Enterprise Manager.. it doesnt create the script, per se-- but it's a
lot more powerful than EM and QA
David Portas
6/22/2005 2:56:48 AM
[quoted text, click to view]

More powerful? Can you give an example of something that can be done
with Access ADP but not with QA?

EM or Access are easy options for some management tasks because they
mask some of the underlying details. But that can be a weakness as well
as a strength. In small installations EM or Access are a reasonable
solution for management tasks but in larger shops that demand
configuration management and source control they will not be an option
for modifying databases directly. That means the DBA needs to
understand the scripts he/she will be executing. In the long run the
administrator who knows TSQL can be more productive and has access to
more functionality than is exposed through any GUI. That's not to say
that the GUI tools don't have their place, just so long as their
limitations are understood.

--
David Portas
SQL Server MVP
--
AddThis Social Bookmark Button