Sorry for the late reply, I had to give this some time to digest.
I'm still trying to wrap my head around the concept that triggers don't
belong to a table...
On 2013-04-26 17:15, Richard Huxton wrote:
On 26/04/13 10:01, CR Lender wrote:
I think this is more a problem of terminology rather than
I have two tables with countries and persons living in those countries:
create table countries (
codechar(2) not null primary key,
eu boolean not null
);
insert into countries values
('AR', false),
('BE', true),
('CH',
two triggers?.
one on eu_loans... and one on persons (if valid eu_loan - cant move...)
2013/4/26 CR Lender crlen...@gmail.com
I have two tables with countries and persons living in those countries:
create table countries (
codechar(2) not null primary key,
On Fri, 26 Apr 2013 11:01:28 +0200
CR Lender crlen...@gmail.com wrote:
I have two tables with countries and persons living in those
countries:
create table countries (
codechar(2) not null primary key,
Isn't this redundant? Primary keys are always NOT NULL.
Enter
On 2013-04-26 12:17, D'Arcy J.M. Cain wrote:
On Fri, 26 Apr 2013 11:01:28 +0200
CR Lender crlen...@gmail.com wrote:
create table countries (
codechar(2) not null primary key,
Isn't this redundant? Primary keys are always NOT NULL.
Yes, I forgot to remove the NOT
On Fri, Apr 26, 2013 at 11:01:28AM +0200, CR Lender wrote:
Is there any way to ensure that all donors and recipients in eu_loans
are in the EU, without altering the countries and persons tables?
One way to do this would be to add countries to the eu_loans table so
it looks like this:
create
On 26/04/13 10:01, CR Lender wrote:
I can add a trigger on eu_loans to check if Diane and Betty both live in
the EU. The problem is how to prevent one of them from moving to a
non-EU country (if they do, the loan has to be cancelled first). They
are however allowed to move to other EU countries.