Use the TIMESTAMP type to define a column in a table
SQL> -- Use the TIMESTAMP type to define a column in a table
SQL>
SQL> CREATE TABLE purchases_with_timestamp (
2 product_id INTEGER ,
3 customer_id INTEGER ,
4 made_on TIMESTAMP(4)
5 );
Table created.
SQL>
SQL>
SQL> desc purchases_with_timestamp;
Name Null? Type
----------------------------------------------------------------------------------------------------- -------- --------------------------------------------------------------------
PRODUCT_ID NUMBER(38)
CUSTOMER_ID NUMBER(38)
MADE_ON TIMESTAMP(4)
SQL>
SQL> drop table purchases_with_timestamp;
Related examples in the same category