Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle question
>
> I just completed my first class in Oracle and for my final
> project I built
> a music CD database. I have a table called "songs" which has the
> song title
> and the running time (among other fields) and a table called
> "album" which
> links to the "songs" table. What is the best way to define the duration
> of every song?
>
> Thank you for your support.
>
> --
> Posted via http://dbforums.com
Assuming the running time is stored in seconds:
create table album (
album_id number primary key,
descr varchar2(50)
);
create table song (
album_id references album, descr varchar2(50),
select
sum(song.running_time),
album.descr
from
album, song
where
album.album_id = song.album_id
group by
album.descr,album.album_id;
-- no sig todayReceived on Sun Jan 19 2003 - 06:05:39 CST
![]() |
![]() |