插入特殊的值-SQL语言基础

时间:2024-05-15 13:25:04
【文件属性】:

文件名称:插入特殊的值-SQL语言基础

文件大小:5.26MB

文件格式:PPT

更新时间:2024-05-15 13:25:04

SQL 基础

插入特殊的值 * SQL> INSERT INTO emp (empno, ename, job, 2 mgr, hiredate, sal, comm, 3 deptno) 4 VALUES (7196, 'GREEN', 'SALESMAN', 5 7782, SYSDATE, 2000, NULL, 6 10); 1 row created. SYSDATE函数取出当前的日期的时间. * INSERT INTO emp (empno, ename, job,mgr, hiredate, sal, comm,deptno) VALUES (7196, 'GREEN', 'SALESMAN',7782, SYSDATE, 2000, NULL, 10); Inserting Special Values by Using SQL Functions You can use pseudocolumns to enter special values in your table. The slide example records information for employee Green in the EMP table. It supplies the current date and time in the HIREDATE column. It uses the SYSDATE function for current date and time. You can also use the USER function when inserting rows in a table. The USER function records the current username. Confirming Additions to the Table SQL> SELECT empno, ename, job, hiredate, comm 2 FROM emp 3 WHERE empno = 7196; EMPNO ENAME JOB HIREDATE COMM --------- ---------- --------- --------- --------- 7196 GREEN SALESMAN 01-DEC-97


网友评论