CREATE TABLE Contain
(
Disk_ID int NOT NULL,
Artist_ID int NOT NULL,

CONSTRAINT Fk_Disk_id FOREIGN KEY(Disk_ID) REFERENCES Disks(Disk_ID) ON DELETE CASCADE,
CONSTRAINT Fk_Artist_id FOREIGN KEY(Artist_ID) REFERENCES Artists(Artist_ID) ON DELETE CASCADE,
)

I have a Home Music Managment Database and software to work with it.
I have 4 relational Tables
i want to block inserting records to the table Contain with my own condition
i know some other ways to block inserting (Triggers) but i can not include my own condition
this is my condition
if Disk_ID=1 or Disk_ID=2 or etc it can be any value ex --> IF Disk_ID=1 i want to block the insert operation. else i want to insert my record
Thank you Pro's

Please make your condition a bit clear. Without a clear condition no suggestion can be made.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.