I looked into triggers, but the SQLite implementation did not seem to have the flexibility I needed to implement ENUM.
btw - i am not a DB guy at all (tho maybe that will change soon!),
so my 'DB/SQL intuitio' is still embryonic.
By your suggestion to use a 'foreign key', do you mean
create, for example, a 1-column table whose entries are the valid ENUM values and associate it
to other tables containg column(s) that need the ENUM constraint?
tx,
- rich
Yes, that is what I'm talking about.
An ENUM is conceptually the same as making said 1-column table and using it in foreign-key constraints.
Practically, speaking, though, using the table is almost always better, because you can add or remove items from the allowed list easily without changing any of your database's schema.
The only time that ENUMs are actually useful is if you are quite certain that the options to choose from will never change; it should also be a relatively small list, the M/F being an example.
-- Darren Duncan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]