modifying column Properties
You can use the ALTER TABLE statement not only to add new columns and delete columns, but also to modify the properties of a column, for example, from a new set of column names, data types
Length, whether it is empty, you can also set or cancel the primary KEY constraint for a column
When setting column names, data types, lengths, and whether to allow nulls, ALTER TABLE's syntax format:
ALTER TABLE TABLE_NAME
Alter COLUMN COLUMN_NAME New_type_name
Change the Name column data type in the Student records management system database to the nvarchar (20) statement as follows
Use Student performance management system
ALTER TABLE student Information
ALTER column name nvarchar (a) null
Add Delete table column
Using the ALTER TABLE statement, you can also add/remove columns, such as adding the class information column to the course Information table, as follows
Use Student performance management system
Go
ALTER TABLE Course Information
Add class Information Datatime
Use Student performance management system
Go
ALTER TABLE Course Information
Is the drop column mandatory cascade
Cascade means cascade Delete
SQL server2008 modifying Column properties