March 2001
Intermediate to advanced
640 pages
14h 9m
English
As your application development progresses, you might realize that you should have used a different length or data type. Or maybe you shouldn't have allowed NULL in a particular column. The ALTER TABLE command can be used to make these changes. In previous versions of SQL Server, you had to drop most objects and re-create them to make any changes. As I have already said, "Things change!" It's time to figure out how to modify and add new objects or settings to a table, and how to change what is already there. The ALTER TABLE command is used to perform this work. The syntax of the command is
ALTER TABLE table { [ [ALTER COLUMN column_name { new_data_type [ (precision[, scale] ) ] [ NULL | NOT NULL ] | { ADD | DROP} ROWGUIDCOL } ...
Read now
Unlock full access