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!

ORA-30075: TIME/TIMESTAMP WITH TIME ZONE literal must be specified in CHECK

VJ4Mar 23 2011 — edited Mar 24 2011
Hello,
I am using ORACLE DATABASE 11g (Standard Edition) and RHEL 5.

Recently i wanted to apply check constraints on my table on a column which contains values as "SYSTIMESTAMP" so i fired the below query...
alter table data_1 
add constraints data1_chk 
check(
date_time 
between 
'23-MAR-11 02.20.30.646517 PM +05:30'
and '24-MAR-11 02.20.30.646517 PM +05:30'
)
and i got this error as output ...
ORA-30075: TIME/TIMESTAMP WITH TIME ZONE literal must be specified in CHECK constraint
I searched on internet including OTN forum but was not able to find any proper solution. Most of the places on internet they have given as ..

ORA-30075:TIME/TIMESTAMP WITH TIME ZONE literal must be specified in CHECK constraint
Cause: User is trying to create a constraint on a time or timestamp with or without time zone column without explicitly specifying the time zone.
Action: Use time or timestamp with time zone literals only.

but how to apply in check constraint ???

My table column's data type on which i am applying the constraint is = "TIMESTAMP(6) WITH TIME ZONE"

thanks in advance ...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2011
Added on Mar 23 2011
4 comments
1,622 views