No, that's not true, the semantics may seem confusing, but it is perfectly legal to have a self-referential foreign key (at least in the databases with which I'm familiar DB2, SQLServer, Oracle). This is really the only way to build a proper tree structure out of your data.
-----Original Message----- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 2:02 PM To: Apache Torque Users List Subject: Re: Tables with foreign keys to themselves don't maintain Lists ofrelated rows. On Tue, 2003-09-23 at 16:54, Gary Baker wrote: > I've got a table with a foreign key to itself. I'm definitely not an SQL guru (I write printers, fer gosh's sake :) but... isn't a foreign key by definition a key in another table? Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
