|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Data & hour
I have created a table:
CREATE TABLE SOCIS ( NOM VARCHAR2 (20), DATA DATE, CONSTRAINT SOCIS_PK PRIMARY KEY (NOM,DATA) ); ¿DATA can contains a data and hour like 9-3-2000 11:00? ¿Or I have to create other row for the hour? |
|
#2
|
|||
|
|||
|
Every reference of DATE data type stores date and time information which is optional, if you dont insert the time information, oracle uses the default value 00:00:00.
time information can be stored with date as follows: UPDATE emp SET hiredate = to_date('17-DEC-1980 14:30:00','DD-MON-YYYY HH24:MI:SS') WHERE empno=7369 / and can be queried as follows: SELECT empno,ename,to_char(hiredate,'DD-MON-YYYY HH24:MI:SS') FROM emp WHERE to_char(hiredate,'DD-MON-YYYY HH24:MI:SS')='17-DEC-1980 14:30:00' / Regards |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Data & hour |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|