0
Can yâall help me
So Iâm new in this and Iâm using Phpmyadmin but how can I make my table check if the Person 1 is Equal to person 2 Like Mike is the Brother of Mike this should be false So I want to make a Constraint I heard I can do this with Check Where I only have to put SELECT TABLE Blabla CHECK (Person1 !=Person2); But I donât know 1. where to put this and 2. How to make a Warning â Mike canât be his own brotherâ I hope I could explain my Problem and you guys could help me
3 RĂ©ponses
+ 1
Are you looking for the where clause.
SELECT *
FROM sites
WHERE site_name = 'TechOnTheNet.com';
https://www.techonthenet.com/mariadb/where.php
SELECT *
FROM blabla
WHERE Person1 !=Person2;
0
thank yall for the help so I did now made a constraint
ALTER TABLE Person
ADD CONSTRAINT CHK_PERSON
CHECK(Person1ID<>Person2ID)
that should only accept valid relationships