mardi 14 juin 2016

Trouble with Basic MySQL [on hold]

I am having trouble with some MySQL questions. I know they are pretty basic, but I am struggling to understand the "optional default" parts of the questions.

Any help would be appreciated.

The two tables look like

Students
id (identity) addressID (nullable) name phone email

Addresses
id (identity) studentID street city country postal_code

The questions are:

  1. get a list of students with optional default address (all values)
  2. get a list of only students that have a default address set (student id only)
  3. get a list of all students and all their addresses, not just default ones (student id and address id only)
  4. get a list of students that have an address set to them (student id and name)

Any insight would be much appreciated. I don't necessarily need answers, just trying to understand the default part.

Thank you

Aucun commentaire:

Enregistrer un commentaire