> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baenninger.me/llms.txt
> Use this file to discover all available pages before exploring further.

# CHECK

Mit dem `CHECK`-Constraint können wir den Wertebereich limitieren.

```sql theme={null}
CREATE TABLE Persons (
    Id INTEGER NOT NULL,
    LastName VARCHAR(255) NOT NULL,
    FirstName VARCHAR(255),
    Age INTEGER,
    City VARCHAR(255),
    CONSTRAINT CK_Person_Age CHECK (Age >= 18)
);
```

```sql theme={null}
ALTER TABLE Persons
ADD CONSTRAINT CK_Person_Age CHECK (Age >= 18);
```

```sql theme={null}
ALTER TABLE Persons
DROP CHECK CK_Person_Age;
```
