Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a unusual question.
The human resources needs to export an old DB to a new one.
And the guys managing the new DB wants one csv file with every dataset existing. I did a Relational database and now i find it difficult to write the select statement.

I did this:

FROM teilnehmer, personen, seminare, termine, kategorien, haeuser
WHERE teilnehmer.sid = seminare.sid  
AND =  
AND termine.sid = seminare.sid  
AND seminare.katid = kategorien.katid  
AND personen.hausid = haeuser.hausid

but i only get ~1500 entrys. I know thats to little, because when i look for a Name and all the workshops he/she did, i get much more than what is in this export.

I don't need the answer i would appreciate if someone could give me a little hint in how to get this done. Till yet i had only like one join for the data i'd needed to display but this confuses me.

share|improve this question

My guess is you need to specify the type of join. You really want a "full outer join" which will not exclude records. A select where you join by keys will default to an inner join.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.