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

在SQL语言基础中插入特殊的日期值

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

资源介绍

插入特殊的日期值 * SQL> INSERT INTO emp 2 VALUES (2296,'AROMANO','SALESMAN',7782, 3 TO_DATE('FEB 3, 1997', 'MON DD, YYYY'), 4 1300, NULL, 10); 1 row created. 检验结果. EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ----- ------- -------- ---- --------- ---- ---- ------ 2296 AROMANO SALESMAN 7782 03-FEB-97 1300 10 增加一个新的员工. * Inserting Specific Date and Time Values The format DD-MON-YY is usually used to insert a date value. With this format, recall that the century defaults to the current century. Because the date also contains time information, the default time is midnight (00:00:00). If a date must be entered in a format other than the default format—for example, another century and/or a specific time—you must use the TO_DATE function. The example on the slide records information for employee Aromano in the EMP table. It sets the HIREDATE column to be February 3, 1997. If the RR format is set, the century may not be the current one.