Error updating primary drop

07 Feb

You may not drop the last (only) column in a table.CASCADE/RESTRICT doesn't consider whether the column being dropped is used in any indexes.The schema objects which can cause a DROP COLUMN RESTRICT to be rejected include: views, triggers, primary key constraints, foreign key constraints, unique key constraints, check constraints, and column privileges.If one of these types of objects depends on the column being dropped, DROP COLUMN RESTRICT will reject the statement. However, if you specify CASCADE, the generated column is also dropped with CASCADE semantics.

Primary keys must contain UNIQUE values, and cannot contain NULL values.You must drop and re-create those views if you wish them to return the new columns.for a new column is almost the same as for a column in a CREATE TABLE statement.When a column is dropped, it is removed from any indexes which contain it.If that column was the only column in the index, the entire index is dropped. A default value is the value that is inserted into a column if no other value is specified.