Sunday, 15 April 2012

sql - Simple Joins not working in H2 Database when giving multiple tables -



sql - Simple Joins not working in H2 Database when giving multiple tables -

i have many tables , want retrieve info joins in h2 database simple bring together not working when given multiple tables.

select a.*, b.name "make", c.name "model" basicinfo a, make_models b, make_models c a.make=b.id , a.model = c.id;

while if bring together 2 tables e.g.: works when multiple tables given shows query executed result 0 rows.

this query similar mysql syntax. there wrong query or h2 doesn't back upwards it?

try below query

select a.*, b.name "make", c.name "model" basicinfo bring together make_models b on a.make = b.id bring together make_models c on a.model = c.id;

sql join h2

No comments:

Post a Comment