登录 注册
当前位置:主页 > 资源下载 > 在SQL语言基础中插入特定值

在SQL语言基础中插入特定值

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

资源介绍

插入特殊的值 * 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