登录 注册
当前位置:主页 > 资源下载 > 在SQL语言基础中,插入包含空值的行

在SQL语言基础中,插入包含空值的行

  • 更新:2024-07-07 12:07:02
  • 大小:5.26MB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:Informix - 数据库
  • 格式:PPT

资源介绍

插入带有空值的行 * SQL> INSERT INTO dept (deptno, dname ) 2 VALUES (60, 'MIS'); 1 row created. 明确的方法: 指定 NULL 关键字. SQL> INSERT INTO dept 2 VALUES (70, 'FINANCE', NULL); 1 row created. 省略的方法: 从列的链表忽略有空值的列. * Methods for Inserting Null Values Be sure that the targeted column allows null values by verifying the Null? status from the SQL*Plus DESCRIBE command. The Oracle Server automatically enforces all datatypes, data ranges, and data integrity constraints. Any column that is not listed explicitly obtains a null value in the new row. Instructor Note Common errors that can occur during user input: Mandatory value missing for a NOT NULL column Duplicate value violates uniqueness constraint Foreign key constraint violated CHECK constraint violated Datatype mismatch Value too wide to fit in column