In this lesson, you learn how to add a NOT NULL constraint on a column.
In the left pane of Sybase Central, double-click Tables.
Click MyProducts, and then click the Columns tab in the right pane.
Select the ProductName column.
From the File menu, choose Properties.
Click the Constraints tab and select 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 value.
This constraint means that for each row added to the Products table, the ProductName column must have a value.
From the File menu, choose Save.
|Discuss this page in DocCommentXchange.
Send feedback about this page using email.
|Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|