From: Martijn Tonies Date: March 4 2004 7:04pm Subject: Re: constraints within a table List-Archive: http://lists.mysql.com/mysql/161145 Message-Id: <00bb01c4021b$932dc780$0702a8c0@martijn> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, > I have a table where I would like members of a uid field to be limited > by the range of values that are in another field. What I am looking for > would be taken care of with the enum() operator except I need the range > of values to be dynamic - because uid will change. I've been told that > foreign key constraints is what I want for this problem but I wonder do > they have to be foreign? All I want is a dynamic enum constraint for on > column depending on the values in another, within the same table. As far as I know, ENUMs cannot be "dynamic". So yes, they have to be FKs. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com