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!

Composite key with date field

448194Jan 11 2006 — edited Jan 11 2006
i have a problem as follows:-

i have created a table as follows & put primary key constraint as follows:

create table mob_check (no number , dat date)

alter table mob_check add primary key(no,dat)

now, if i put values like -

insert into mob_check values (1,sysdate)
insert into mob_check values (1,sysdate),

it does not consider sysdate as a constraint if there is even some difference in time.
So, please, tell me how to restrict entry of same date, how to put primary key constraint for such a constraint.

regards.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 8 2006
Added on Jan 11 2006
5 comments
661 views