Home > database >  How to add a timestamp in PLSQL table
How to add a timestamp in PLSQL table

Time:10-05

The create table lms_purchases_with_timestamp (
Product_id integer references lms_product (product_id),
Customer_id integer references lms_customers (id),
Made_on timestamp (4));

CodePudding user response:

What do you mean?
SQL> The select sysdate from dual;

SYSDATE
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
The 2016-10-25 20:06:30

CodePudding user response:

 create table id (id int, t timestamp default systimestamp) 

CodePudding user response:

How to insert in the lms_purchases_with_timestamp data into the table

CodePudding user response:

Insert into lms_purchases_with_timestamp
The select id1, id2, sysdate from dual;

- sysdate time accuracy should be able to meet the requirements of your system

CodePudding user response:

Since a timestamp, a default value to a field that data into don't tube he

 create table id (id int, t timestamp default systimestamp) 
  • Related