Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to define a Integrity constraint like this?
Hi,
create a unique composite index over usrid, operate_type, finish_flag that also means that any other combination with finish_flag can occur only ones.
On Sat, 28 Mar 1998 01:54:15 -0600, sj_at_china.pages.com.cn wrote:
>Hello :
>
> I am design a table in oracle 7.3.3 , I want to define a table like this
>
> it has 3 parts:
>
> regno varchar(16)
> usrid varchar(8)
> operate_type number(2)
> finish_flag number(1)
>
> Now , I want to contraint the table to have a constraint like this:
>
> Item in the table , which contains : a special usrid , a special
>operate_type and finish_flag=0 , should be UNIQUE .
>
> the table's pramary key us a regno , which is generate from a sequence .
>
> Thank you very much!
>
> Jing Shen
>
> Mail to: sj_at_china.pages.com.cn
>
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading
-- Regards Matthias Gresz :-) GreMa_at_T-online.deReceived on Mon Mar 30 1998 - 00:00:00 CST