Re: [SQL] Please help to wite the constraint.

2005-11-22 Thread Grigory O. Ptashko
> I can't understand why you are doing this big cycle.. but certainly > when constraints can't help you.. you can use triggers to enforce > integrity.. In my system I have to have arbitrary contact info records about my users. I mean not only fixed like names, email and phone but many many other

Re: [SQL] Please help to wite the constraint.

2005-11-21 Thread Samer Abukhait
I can't understand why you are doing this big cycle.. but certainly when constraints can't help you.. you can use triggers to enforce integrity.. On 11/20/05, Grigory O. Ptashko <[EMAIL PROTECTED]> wrote: > Hello, everybody! > > I don't whether it is possible to do the following but anyway I can't

[SQL] Please help to wite the constraint.

2005-11-20 Thread Grigory O. Ptashko
Hello, everybody! I don't whether it is possible to do the following but anyway I can't. I need to write a constraint as described below. Here are four tables: CREATE TABLE countries (id SERIAL, name VARCHAR(255), PRIMARY KEY (id) ); CREATE TABLE countries_names (id INT NOT NULL, id_lang INT