Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - SQL Usage » Creating Databases » Ensuring data integrity » Using column defaults

 

Altering and dropping column defaults

You can change or remove column defaults using the same form of the ALTER TABLE statement you used to create the defaults. The following statement changes the default value of a column named OrderDate from its current setting to CURRENT DATE:

ALTER TABLE SalesOrders
ALTER OrderDate DEFAULT CURRENT DATE;

You can remove column defaults by modifying them to be NULL. The following statement removes the default from the OrderDate column:

ALTER TABLE SalesOrders
ALTER OrderDate DEFAULT NULL;