On 7/24/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote:

That's a real pumper.  How do you alter constraints on existing tables
??!

You can't.  You would need to create a new table with the desired
constraints, copy the data into it, drop the old table, and rename the
new one.

alter table assetdownload
       add constraint assets_assetdownload_FK1 foreign key (assetId)
        references assets (assetId)
       ON UPDATE CASCADE ON DELETE CASCADE;

Also note that this entire set of constraints won't do what you want:
sqlite does not enforce foreign keys.  (Triggers can get you most of
the same things if needed.)

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to