Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which join type is used when using just JOIN in PostgreSql?

I prefer to indicate join types when I use it in database systems but when I switch to a new project, there is a single join is used. Generally I prefer to use LEFT JOIN or INNER JOIN according to my needs, but I have not found which JOIN type is considered when a single JOIN is used in PostgreSQL.

select p.uuid from Product s " +
       join Category c on p.uuid = c.siteUuid
       join Brand b on b.uuid = c.brandUuid

1 Answers

Inner Join is the default join when we use plain JOIN.

For better readablity of the queries, It is always preferred to write INNER JOIN

Reference: https://www.postgresql.org/docs/current/queries-table-expressions.html#id-1.5.6.6.5.6.4.3.1.2

like image 150
mahbuhs_redoc Avatar answered May 22 '26 13:05

mahbuhs_redoc