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

Was it helpful?

Solution

You would add a check constraint:

CREATE TABLE Range (
    Number integer,
    check (number between 1 and 9999)
);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top