Skip to content
Advertisement

Create CHECK constraint SQL

I hope you can help me.

I would like to create a check constraint that ensure the column INKOOPBEDRAG has to be higher than PRIJS_PER_D.

In the table INKOOPOVEREENKOMST.[BARCODE] it is a FK to ARTIKEL.[BARCODE].

I have created the following CHECK constraint, but I get an error:

enter image description here

Advertisement

Answer

I solved this using the following:

Then I added a Constraint as follows:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement