Domanda

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

È stato utile?

Soluzione

You would add a check constraint:

CREATE TABLE Range (
    Number integer,
    check (number between 1 and 9999)
);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top