Re: Column NUMBERS accepting only a pre defined range of numbers

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sun, 17 Apr 2011 17:00:05 +0200
Message-ID: <4dab0077$0$15010$426a74cc_at_news.free.fr>


"Wilfrid" <grille12_at_gmail.com> a écrit dans le message de news: 4daadb68$0$23678$426a34cc_at_news.free.fr...
| Hello,
|
| I have a table such as below. Is there a way to limit the range of
| number so it does not exceed a predefined maximum limit?
| For instance the maximum range for the ID column would 750 and if there
| is an attemps to insert or update a record that contain a column with
| 845, it will return an error.
|
| Thanks in advance for your help.
| Wilfrid
|
|
| CREATE TABLE orders
| (
| name VARCHAR2(20),
| ID NUMBER(10),
| dateofrecord DATE)
| constraint pk_ID (ID)
| )
|

Have a look at constraint:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/clauses002.htm#g1053592

Regards
Michel Received on Sun Apr 17 2011 - 10:00:05 CDT

Original text of this message