文件名称:插入带有空值的行-SQL语言基础
文件大小:5.26MB
文件格式:PPT
更新时间:2024-05-15 13:25:04
SQL 基础
插入带有空值的行 * 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