In this post, we will discuss how to modify table structure in GUI in sql server 2008. Also, you can check out my previous posts on:
To modify the table structure in GUIwithinn Object Explorer follow the below steps.
– Right click on the table and chose “Design”, that opens the design of the table.
– To change the datatype of a column directly click on the datatype of the column you want to modify, then modify the datatype.
– To add or remove the not null constraint use Allow Nulls check box provided with each column.
– To add a column to the table at the end of existing columns in the table you will have an empty column to specify the column name, datatype and whether or not to allow nulls.
– To add constraints in the table follow the same procedure as adding constraints to the table while creating the table in GUI.
– To delete the primary key constraint right click on the primary key column and choose to remove the primary key.
– To delete the default constraint, click on the column on which you want to delete the default constraint. Go to column properties and remove the default value specified for the column at the property default value or binding.
– To delete unique, check constraint and foreign key constraint right click on the table and open the corresponding dialog box where you will have the button ‘remove’ to delete the constraint.
– To delete a column, select the entire column by clicking on the button available on left of the column and then press the delete button on the keyboard.
After making all required changes to the structure of the table, click on the save button in the tool box to applying changes to the table and then close the dialog box.