Use the following procedure to add a NOT NULL constraint to a column.
In the left pane of Sybase Central, double-click Tables.
Click Products, and then click the Columns tab in the right pane.
Click the ProductName column.
Click File menu, click Properties.
Click the Constraints tab and click Values Cannot Be NULL.
By default, columns allow NULLs, but it is good practice to declare columns NOT NULL unless there is a good reason to allow NULLs. See NULL special value.
Click OK.
This constraint means that for each row added to the Products table, the ProductName column must have a value.
In the File menu, click Save.
Proceed to Lesson 4: Creating a foreign key.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |