PostgreSQL/Constraints/Column Relations

Материал из SQL эксперт
Версия от 13:14, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Specifying the column relation

   <source lang="sql">

postgres=# postgres=# postgres=# CREATE TABLE products ( postgres(# product_no integer, postgres(# price numeric CHECK (price > 0), postgres(# discounted_price numeric CHECK (discounted_price > 0), postgres(# CHECK (price > discounted_price) postgres(# ); CREATE TABLE postgres=# drop table products; DROP TABLE postgres=# postgres=#

      </source>