Sambhaw
Sambhaw

Reputation: 21

Invalid data type error on create table oracle

Create table image_media_tracking (
    image_rowid_src ROWID,
    image_id NUMBER(6), 
    image_src BLOB,
    image_time sysdate
);

Upvotes: 1

Views: 318

Answers (3)

user1919238
user1919238

Reputation:

sysdate is not an Oracle datatype (it is the function that returns the current date and time).

You need date, or one of the other date time datatypes.

Upvotes: 2

Ankit Bajpai
Ankit Bajpai

Reputation: 13509

It seems you need the time instead of date so use use Datetime rather.

Upvotes: 2

Utsav
Utsav

Reputation: 8093

As I mentioned in the comment, use date instead of sysdate.

Also if you want column to be sysdate by default, use

Create table image_media_tracking (
    image_rowid_src ROWID,
    image_id NUMBER(6), 
    image_src BLOB,
    image_time date default sysdate
);

Upvotes: 3

Related Questions