where bilägare.pnr = fordon.pnr
group by bilägare.fnamn,bilägare.enamn;
dbms_output.put_line('Namn: '||v_fnamn||','||'Efternamn: '||v_enamn||','||'Bilar '||v_pnr);
One thing: when you have structured text such as Java code, XML or SQL/DDL, you can use our "code" button in the message editor to wrap the structured text and make it more readable.
Also I would caution you not to become too quick to use PL/SQL to solve all your database problems. There are a number of reasons why the use of stored procedures should be avoided wherever possible, including lack or portability and the extra load it places on the database server. You can do a lot with ordinary (non-procedural) SQL, although I will admit that it requires you to learn to fold your brain in ways you're not used to.
Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop