Pregunta

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

¿Fue útil?

Solución

You would add a check constraint:

CREATE TABLE Range (
    Number integer,
    check (number between 1 and 9999)
);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top