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

时间:2021-04-25 19:38:24
【文件属性】:
文件名称:插入特殊的日期值-SQL语言基础
文件大小:5.26MB
文件格式:PPT
更新时间:2021-04-25 19:38:24
SQL 基础 插入特殊的日期值 * 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.

网友评论