I have the following table:
DROP TABLE IF EXISTS employees;
CREATE TABLE cars (
model VARCHAR (50),
brand VARCHAR (50),
price INTEGER
);
Which looks like the following:
model brand price
Clio Renault 3000
Clio Renault 2700
Polo Volkswagen 4400
Golf Volkswagen 3400
I want to perform a CHECK
(or other) operation to guarantee that a model
cannot have multiple different brands
. I am not sure how to insert information from another column when performing the check statement for model.