I am looking for a possibility to use two possibilities for one attribute. Here an example:
CREATE TABLE person (
name VARCHAR(200),
age INTEGER CONSTRAINT adult
CHECK (age >= 18)
)
Here the code will call a Person adult if the age is over 18, but now I would like the to person is called child if he is under 18.
CREATE TABLE Person (
Id INTEGER NOT NULL PRIMARY KEY,
power_level INTEGER NOT NULL,
evilness_level INTEGER NOT NULL,
name VARCHAR(256) NOT NULL UNIQUE,
)
or here if the person has an evilness_level of < 0 it's a super hero, otherwise it is a super villain.
have a good day!