> It looks more like the person that designed the schema has payed very > little attention to the SQL standard. You can not blame anyone but the > designer for naming a field 'role' (which is a keyword in the SQL > standard) or using a non-standard set field type instead of a proper > lookup table.
Well that would be the folks at MythTV, I think. > CREATE TABLE "credits" ( > "person" integer NOT NULL default '0', > "chanid" int NOT NULL default '0', > "starttime" timestamp NOT NULL default '1970-01-01 00:00:00+00', > "role" VARCHAR NOT NULL, > CONSTRAINT role_check CHECK "role" IN > ('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest'), > > -- CONSTRAINT "chanid_constraint0" UNIQUE > ("chanid","starttime","person","role") > -- UNIQUE KEY "chanid" ("chanid","starttime","person","role"), > -- KEY "person" ("person","role") > ); > > If that doesn't work, rename the role field. And it might be a good > idea to give this table a primary key. Thanks, I really appreciate your help.:-) I'll give this a whirl. As for primary key's I'll try something like : PRIMARY KEY "chanid" ("chanid","starttime","person","role") -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]