Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date default value

RobeenFeb 13 2020 — edited Feb 13 2020

Oracle DB 12.2.0

REL 7.4

Hello Team,

is there a way I can specify the default date for field date1?

CREATE TABLE  archicom_2020 (

  type char(4) DEFAULT '' NOT NULL,

  cc1 char(4) DEFAULT '' NOT NULL ,

  calling varchar2(20)  DEFAULT '' NOT NULL,

  cc2 char(4) DEFAULT '' NOT NULL,

  called varchar(20) DEFAULT '' NOT NULL,

  date1 timestamp DEFAULT '0000-00-00 00:00:00' to_timestamp(date1,'YYYY-MM-DD HH24:MI:SS') NOT NULL, <-----------------------------

  duration int DEFAULT '0' NOT NULL,

  region char(4) DEFAULT '' NOT NULL,

  cell varchar2(5)  DEFAULT '' NOT NULL,

  IMEI varchar2(16) DEFAULT '' NOT NULL,

  IMSI varchar2(16)  DEFAULT '',

  rectype number(5,0) DEFAULT '0' NOT NULL ,

  msisdn_type varchar2(3)  DEFAULT '' NOT NULL

  ) tablespace TEST_TBS;

Regards,

Joe

This post has been answered by User_H3J7U on Feb 21 2022
Jump to Answer
Comments
Post Details
Added on Feb 13 2020
15 comments
22,628 views