INTERVAL DAY TO SECOND type to store time intervals measured in days and seconds
SQL> -- INTERVAL DAY TO SECOND type to store time intervals measured in days and seconds.
SQL>
SQL> CREATE TABLE promotions (
2 promotion_id INTEGER CONSTRAINT promotions_pk PRIMARY KEY,
3 name VARCHAR2(30) NOT NULL,
4 duration INTERVAL DAY(3) TO SECOND (4)
5 );
Table created.
SQL>
SQL>
SQL> desc promotions;
Name Null? Type
----------------------------------------------------------------------------------------------------- -------- -----------------------
PROMOTION_ID NOT NULL NUMBER(38)
NAME NOT NULL VARCHAR2(30)
DURATION INTERVAL DAY(3) TO SECOND(4)
SQL>
SQL> drop table promotions;
Table dropped.
Related examples in the same category