Hi,
Given three tables: a car table, an extras table and a link table, something like:
table_car
---------
int car_id
string make
string model
table_extras
------------
int extra_id
string extra
table_car_extras_link
---------------------
int car_id
int extra_id
I'd like to write a PL/SQL stored proc that returns data in the following way:
car_id, make, model, extra[]
e.g.
1, Ford, Fiesta, sunroof;electric windows
2, BMW, M3, sports pack;alarm;sat nav
3, subary, impreza, leather seats;ABS
I'm very much a novice when it comes to databases, so any help appreciated. Note that in our real system we'll be returning 1000s of 'cars' with each car having up to about 10 'extras'