Re: check constraint
От | oberpwd@anubis.network.com (Wade D. Oberpriller) |
---|---|
Тема | Re: check constraint |
Дата | |
Msg-id | 200012181543.JAA08690@truck.network.com обсуждение исходный текст |
Ответ на | check constraint ("Martin A. Marques" <martin@math.unl.edu.ar>) |
Ответы |
Re: check constraint
Re: check constraint |
Список | pgsql-general |
You should be able to do the following: CREATE TABLE table1 ( field1 INTEGER CHECK ((field1 >= 0) AND (field1 <= 10)) ); Wade Oberpriller > > Hi, > how should I write a constraint that can keep an INT field with values > between 0 and 10? Do I have to use two checks on the same field? > > TIA > > -- > System Administration: It's a dirty job, > but someone told I had to do it. > ----------------------------------------------------------------- > Martín Marqués email: martin@math.unl.edu.ar > Santa Fe - Argentina http://math.unl.edu.ar/~martin/ > Administrador de sistemas en math.unl.edu.ar > ----------------------------------------------------------------- >
В списке pgsql-general по дате отправления: