Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: some basic oracle questions (assertions etc)
<spliffmonkey_at_iname.com> wrote in message
news:1134078677.617558.302970_at_g14g2000cwa.googlegroups.com...
>I have a couple of questions. If you dont know the answer could you
> point me somewhere that has info on this type of basic stuff:
>
> 1. I want to creat an assertion that states that IF A is 'yes' then B
> and C are NOT NULL. (whereas if A is 'no' then null is acceptable for B
> and C)
>
> 2. If a table of, say, buildings requires a builder, I would specify
> that
> builder would be NOT NULL.
> However, if a table of buildings could have several builders (1 or
> more)
> then I would have a separate table where they both together formed a
> primary key.
> Now my question: How do you specify that a building MUST have a
> builder?
> i.e. how do you ensure that there is an entry for a particular building
> in
> the building-builder table?
>
> 3. Whats wrong with this join?:
> select * from Ride, Rideservicemen where Rideservicemen.Ridename =
> Ride.Ridename;
>
> When it joins the two tables, Ridename is printed twice each time?
>
> Thanks
>
#3 -- nothing wrong with the join in Oracle; however your observation about
the column being returned twice could cause problems in some usages
creating a view: ORA-00957: duplicate column name
using in a cursor: PLS-00402: alias required in SELECT list of cursor to
avoid duplicate column
pointing somewhere:
same sources often mentioned in other posts
download 10g or 10 xe so you have a test bed to try out stuff like this
(www.oracle.com)
read the concepts manual and sql manual (http://tahiti.oracle.com)
ask tom: http://asktom.oracle.com
tom' book: expert one-on-one oracle
++ mcs Received on Fri Dec 09 2005 - 06:38:06 CST
![]() |
![]() |