Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> data definition
Hi
Hope someone here is able to help me.
There is this particular questions which I am not sure how to go about doing it.
example
hotel(hotel_no, room_no, reg_type, datetime)
room(room_no, room_describe)
registration(reg_type, days_stay, payment)
In my data definition how do I make a constraint in such a way that no room_no or hotel_no can have 2 different reg_type at the same time? I tried using Unique but still wrong.
constraint diff_hotel_time check (unique (hotel_no, room_no) where count(*) datetime from hotel>1));
I know the above is wrong, i am unable to come out with a solution on how to match all the dates together so that they can be used for checking on the hotel_no and room_no.
Any help is greatly appreciated. Received on Sun Dec 15 2002 - 03:32:05 CST