ITPub博客

首页 > 数据库 > Oracle > SQL入门之9使用default

SQL入门之9使用default

原创 Oracle 作者:wmlm 时间:2007-04-06 12:16:38 0 删除 编辑
在DML 时显式使用default示例[@more@]Specify DEFAULT to set the column to the value previously specified as the default value for the column. If no default value for the corresponding column has been specified, Oracle sets the column to null.
-- 示例
UPDATE departments
SET manager_id = DEFAULT WHERE department_id = 10;
INSERT INTO departments
(department_id, department_name, manager_id)
VALUES (300, 'Engineering', DEFAULT);

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/271063/viewspace-908948/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: SQL入门之10 MERGE
请登录后发表评论 登录
全部评论

注册时间:2008-04-08

  • 博文量
    398
  • 访问量
    3716779