| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: The Practical Benefits of the Relational Model
And while I'm here guys, does this information equivalent formulation of
the XOR case display the same semantics?
drop table a;
create table a(a integer not null, t CHAR(1) NOT NULL CHECK (t IN ('A',
'B')), primary key(a, t));
insert into a values (1, 'A'), (2, 'A'), (2, 'B'), (3, 'B'), (4, 'B');
drop view v;
create view v as (select distinct a from a ) except (select a from a
group by a having count(*) > 1);
select * from v;
And then should this version, now allow inserts? (note the DEFAULT clause)
drop table a;
create table a(a integer not null, t CHAR(1) NOT NULL WITH DEFAULT 'B'
CHECK (t IN ('A', 'B')), primary key(a, t));
insert into a values (1, 'A'), (2, 'A'), (2, 'B'), (3, 'B'), (4, 'B');
drop view v;
create view v as (select distinct a from a ) except (select a from a
group by a having count(*) > 1);
select * from v;
If so, then I suggest for symmetry, there should be a way of specifying such defaults in the original XOR formulation as well.
Regards
Paul Vernon
Business Intelligence, IBM Global Services
Received on Fri Oct 04 2002 - 11:22:27 CDT
![]() |
![]() |