general questions about joins in queries - Mailing list pgsql-general

From Zlatko Matić
Subject general questions about joins in queries
Date
Msg-id 000001c61b55$4eec0aa0$52bffea9@zlatkovyfkpgz6
Whole thread Raw
Responses Re: general questions about joins in queries
List pgsql-general
Hello.
Is it better to use A) or B) ?
 
A)
 
SELECT
 "public"."departments".*,
 "public"."plants".*,
 "public"."batches_microbs".*,
 "public"."results_microbs".*
FROM
 "public"."departments",
 "public"."plants",
 "public"."batches_microbs",
 "public"."results_microbs"
WHERE
 "plants"."department" = "departments"."department" AND
 "batches_microbs"."plant" = "plants"."plant" AND
 "results_microbs"."batch" = "batches_microbs"."batch"
 
B)
 
SELECT
 "public"."departments".*,
 "public"."plants".*,
 "public"."batches_microbs".*,
 "public"."results_microbs".*
FROM

public.departments
  INNER JOIN public.plants ON (public.departments.department = public.plants.department)
  INNER JOIN public.batches_microbs ON (public.plants.plant = public.batches_microbs.plant)
  INNER JOIN public.results_microbs ON (public.batches_microbs.batch = public.results_microbs.batch)
 

Thanks,
 
Zlatko

pgsql-general by date:

Previous
From: Zlatko Matić
Date:
Subject: linking temporary tables from MS Access?
Next
From: Viktor Lacina
Date:
Subject: Re: general questions about joins in queries