Ent Manager is nice, but I need to make some DDL changes to a database
(convert a column from char to varchar, add a new column, etc) with
SQL. Is there a good primer for this? I'm sure it is not too hard, I
just have not had to do this. Thanks.
-JohnElementary cases are well presented in Books Online.
E.g. (to alter a table and/or columns):
http://msdn.microsoft.com/library/d...br />
3ied.asp
ML
http://milambda.blogspot.com/|||...and use Query Analyzer. I forgot to mention.
ML
http://milambda.blogspot.com/|||"John Baima" <john@.nospam.com> wrote in message
news:f17gq1l0e6cted806ef0ub0ab3tflqmlt4@.
4ax.com...
> Ent Manager is nice, but I need to make some DDL changes to a database
> (convert a column from char to varchar, add a new column, etc) with
> SQL. Is there a good primer for this? I'm sure it is not too hard, I
> just have not had to do this. Thanks.
> -John
EM is "nice" but does a lot of "unneccessary" stuff behind the scenes.
When you change a column from Char to Varchar, it actually:
-creates a new table with the new DDL
-copies the data from the original to the new table
-drops the old table
-renames the new table
-drops and recreates constaints
So do you your charges in Query Analyser, like ML suggests.|||Plus - QA won't "assist" you in "clicking up" a potential disaster. :)
ML
http://milambda.blogspot.com/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment