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

SAP Sybase SQL Anywhere 16.0 (中文) » SQL Anywhere 服务器 - SQL 用法 » 数据完整性 » 列缺省值

 

变更列缺省值

可以使用 ALTER TABLE 语句更改或删除列缺省值,方式与用此语句创建缺省值时相同。

以下语句将名为 OrderDate 的列的缺省值从其当前设置更改为 CURRENT DATE:

ALTER TABLE SalesOrders
ALTER OrderDate DEFAULT CURRENT DATE;

要删除列缺省值,可将其修改为 NULL。以下语句将删除 OrderDate 列中的缺省值:

ALTER TABLE SalesOrders
ALTER OrderDate DEFAULT NULL;

使用列缺省值