Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

When to use select and join

 
Ranch Hand
Posts: 59
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am confused about when to use join and select. Can you please help me to understand
1. what's the difference between the following two queries and
2. When to use them

select c.name, s.address from customer c, shipping s where c.customer_id = s.customer_id;

select c.name, s.address from customer c join shipping s on c.customer_id = s.customer_id;


Thank you.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It returns the same result with ordinary (INNER) JOINs.
In big Querys including several JOINs and WHEREs the JOIN syntax can be easier to read, to distinct them from a simple WHERE i.e. x = 100

Greetings
Wolfgang






reply
    Bookmark Topic Watch Topic
  • New Topic