
How do I disallow NULL values in a table?

Hi friends,
It is a constraints, so It is called column integrity constraints, most of the time it is aplied at table creation time. Most databases allow a default value for the column as well. The following SQL statement displays the NOT NULL constraint: CREATE TABLE book( Id VARCHAR(25) NOT NULL, nameINTEGER NOT NULL, Price NUMERIC(5, 2) NOT NULL );
Note: Note that some databases won't allow the constraint to be applied after table creation.
Thanks.

Hi friends,
It is a constraints, so It is called column integrity constraints, most of the time it is aplied at table creation time. Most databases allow a default value for the column as well. The following SQL statement displays the NOT NULL constraint:
CREATE TABLE book( Id INTEGER NOT NULL, name VARCHAR(25) NOT NULL, Price NUMERIC(5, 2) NOT NULL );
Note: Note that some databases won't allow the constraint to be applied after table creation.
Thanks.