Re: A foreign key on a self-referring table
From: Tony <andrewst_at_onetel.net.uk>
Date: 5 Mar 2004 03:45:24 -0800
Message-ID: <c0e3f26e.0403050345.5bf2c61a_at_posting.google.com>
Date: 5 Mar 2004 03:45:24 -0800
Message-ID: <c0e3f26e.0403050345.5bf2c61a_at_posting.google.com>
"Andrea Laforgia" <alaforgia_at_despammed.com> wrote in message news:<c29bp2$1q225s$1_at_ID-221370.news.uni-berlin.de>...
> Thank you for all your answers.
>
> I was imagining it was weird just because I assumed that, whether, for
> a strange reason, a record pointed to itself, the DBMS would not allow
> to delete it. If I had, for instance:
>
> |--------------------------|
> |CustomerID = 100 |(PK)
> |--------------------------|
> |Name = .... |
> |City = ... |
> |ZipCode = ... |
> |CustomerID = 100 |(FK)
> ----------------------------
>
> Would the DBMS let delete that record ?
Why not try it and see? Shouldn't take a minute! Received on Fri Mar 05 2004 - 12:45:24 CET