lundi 29 juin 2015

SQLITE query, return records from multiple tables each joining their own metatable

I am developing a new database backend for my application for more flexibility.

Instead of one large table with many columns, I now have four tables;

  • Table "roms" (contains a single column 'Name')
  • Table "romsmeta" (contains columns 'Name','Title','Year')
  • Table "software" (contains columns 'System' and 'Name')
  • Table "softwaremeta" (contains columns 'System','Name','Title','Year')

So now I need to use a JOIN type in my queries, but my skills are a bit rusty. Basically, I would like to perform the following pseudo-query;

SELECT Title,Year from (roms INNER JOIN romsmeta,software INNER join softwaremeta) WHERE Title like '%enteredTitle%'

Obviously, this syntax is not valid.

What query would return the results I'm looking for?

Thanks in advance!

Aucun commentaire:

Enregistrer un commentaire