InterviewSolution
| 1. |
How Do I Disallow Null Values In A Table? |
|
Answer» NULL capability is a column integrity constraint, normally applied at table creation time. Note that some databases won't ALLOW the constraint to be applied after table creation. Most databases allow a default value for the column as well. The following SQL statement displays the NOT NULL constraint: CREATE TABLE CoffeeTable (Type VARCHAR(25) NOT NULL, Pounds INTEGER NOT NULL, PRICE NUMERIC(5, 2) NOT NULL ) Null capability is a column integrity constraint, normally applied at table creation time. Note that some databases won't allow the constraint to be applied after table creation. Most databases allow a default value for the column as well. The following SQL statement displays the NOT NULL constraint: |
|