Re: Is there any way we can exclude all possible values ?

On 12/29/06, xiaoyan <xiaoyezi.xyz@xxxxxxx> wrote:
   Is there any way we can exclude all possible values to be  assigned to a
column in a table  without knowing the type of the column ?

While I really don't see any point to this, something like the
following should work...

SQL> create table test (
 2     col1 number(4) not null,
 3     col2 varchar2(10) constraint what_the_heck check (0=1)
 4  );

Table created.

SQL> insert into test values (1, 'test');
insert into test values (1, 'test')
*
ERROR at line 1:
ORA-02290: check constraint (SYSTEM.WHAT_THE_HECK) violated

SQL> insert into test values (1, NULL);
insert into test values (1, NULL)
*
ERROR at line 1:
ORA-02290: check constraint (SYSTEM.WHAT_THE_HECK) violated

--
"I'm too sexy for my code." - Awk Sed Fred.
--
http://www.freelists.org/webpage/oracle-l


Other related posts: