0

Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

create table my_table ( 
 transaction_date DATE DEFAULT { ts '1900-01-01 00:00:00' } NULL 
)

error --

ORA-00911: invalid character
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
 letters and numbers. $#_ are also allowed after the first
 character. Identifiers enclosed by doublequotes may contain
 any character other than a doublequote. Alternative quotes
 (q'#...#') cannot use spaces, tabs, or carriage returns as
 delimiters. For all other contexts, consult the SQL Language
 Reference Manual.

As the above create statement is generated by a third-party software, what's the correct syntax without using date or to_date()?

asked Dec 12, 2018 at 9:27

1 Answer 1

3

Whatever syntax that is, that is not correct in Oracle.

Use this:

create table my_table ( 
 transaction_date DATE DEFAULT timestamp'1900-01-01 00:00:00' NULL 
);
answered Dec 12, 2018 at 9:30
1
  • @ypercubeTM It would, but OP asked for without using date or to_date(). Commented Dec 12, 2018 at 9:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.