Hello, i have this three tables.
Table: Item
Columns: ItemID, Title, Content, NoChange (Date)
Table: Tag
Columns: TagID, Title
Table: ItemTag
Columns: ItemID, TagID
In the Item Table is a Field with NoChange, if this field = true no Tag is allowed to insert a ItemTag value with this ItemID. How can i check this in the insert?
For Updates i have this Statement:
UPDATE ItemTag SET TagID = ? where ItemID = ?
AND TagID = ? AND exists (
select ItemID from Item where ItemID = ? AND NoChange is null)");
Thank you.