Question

How can I create a table, with a variable to be set within a range

CREATE TABLE Range (
    Number integer
);

Number should be between 1-9999 as example

Thanks

Était-ce utile?

La solution

You would add a check constraint:

CREATE TABLE Range (
    Number integer,
    check (number between 1 and 9999)
);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top