Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:13:54+00:00 2026-06-10T05:13:54+00:00

w3schools.com has the following SQL statement example: SELECT Product_Orders.OrderID, Persons.LastName, Persons.FirstName FROM Persons, Product_Orders

  • 0

w3schools.com has the following SQL statement example:

SELECT 
     Product_Orders.OrderID, Persons.LastName, Persons.FirstName
FROM 
  Persons,
  Product_Orders
WHERE 
  Persons.LastName='Hansen' AND Persons.FirstName='Ola'

What is not clear to me is how the product order table is joined with the persons table. Is this SQL proper, and what does it imply about the result set sent back?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:13:56+00:00Added an answer on June 10, 2026 at 5:13 am

    It’s technically proper, though I would avoid using that type of syntax for a couple reasons which I won’t go into right here.

    That syntax is colloquially called the “old style” join syntax and is equivalent to:

    SELECT Product_Orders.OrderID, Persons.LastName, Persons.FirstName 
    FROM Persons
    CROSS JOIN Product_Orders 
    WHERE Persons.LastName='Hansen' AND Persons.FirstName='Ola'
    

    The answer of how they “join” together is that they don’t. The result of the query is the cross product of the entire Product_Orders table with the “Ola Hanson” row(s) in the Persons table. It doesn’t make much sense in most of the use cases I can think of, to be quite honest with you.

    The really strange thing about the results you’ll get here is that the OrderID from the Product_Orders table will not necessarily align with the person on the order. It looks to be a mistake of omission on the page — though to be fair the example intends to demonstrate aliasing, not joins.

    W3Schools doesn’t have a good reputation around here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I learn SQL from this: http://www.w3schools.com/sql/sql_select.asp SELECT LastName,FirstName FROM Persons this show me: LastName
Considering the following 2 lines of code (copied from w3schools.com > HTML < label
An example: http://www.w3schools.com/sql/sql_func_max.asp In the above example, how to get corresponding OrderDate for max(OrderPrice)?
Taking the XSLT and XML from this page as an example: http://www.w3schools.com/xsl/xsl_transformation.asp I have
Using this example: http://www.w3schools.com/php/php_ajax_database.asp I have set up a table echoing from database. I
I'm using the W3 Schools example: http://www.w3schools.com/PHP/php_ajax_database.asp to display a table of database data
I am following this tutorial to make a repeater control: http://www.w3schools.com/ASPNET/aspnet_repeater.asp I have successfully
Is it possible to replace the cursor icon apart from these: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_cursor with my
Hello i need the code from http://www.w3schools.com/ajax/ajax_database.asp rewritten in jquery(if possible) but more important
I am looking at this script from W3schools.com (Ajax, PHP and Mysql) http://www.w3schools.com/php/php_ajax_database.asp <html>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.