Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL Query joins not working as expected
    text
    copied!<p>I created the tables like this:</p> <pre><code>create table utilisateur( id_util number(10) primary key, nom varchar2(10) not null, prenom varchar2(10) not null, date_naissance date not null, adress varchar2(20) ); create table cour( id_cour number(10) primary key, c_nom varchar2(20) not null, auteur varchar2(20) not null ); create table etude( fk_util number(10) references utilisateur(id_util), fk_cour number(10) references cour(id_cour), primary key(fk_util,fk_cour) ); create table examen( id_ex number(10) primary key, ex_nom varchar2(20) not null, temp date, fk_cour number(10) references cour(id_cour) ); create table passer( fk_util number(10) references utilisateur(id_util), fk_ex number(10) references examen(id_ex), primary key(fk_util,fk_ex), note number(4) ); create table certificat( cert_nom varchar2(20), prix varchar2(10), code varchar2(10) primary key, fk_ex number(10), fk_util number(10) ); create table signet( id_sign number(10) primary key, s_nom varchar2(20) not null, depand_par varchar2(20) not null, fk_util number(10) references utilisateur(id_util) ); </code></pre> <p>The problem is that I want to see all the users(<code>utilisateur</code>), wich course(<code>cour</code>) they are reading, wich exam(<code>examen</code>) they have passed and what certificates(<code>certificat</code>) they have received.</p> <p>I have tried to do this with inner join, left and right join, full join, view, but without success. If I have 3 courses enregistrated and 2 exams, than I see something repeating. I'm thinking maybe in my database something is wrong.</p> <p><img src="https://i.stack.imgur.com/4Nhdl.jpg" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload