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 8898935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:44:18+00:00 2026-06-15T00:44:18+00:00

I was hit with the following question today during an interview: How many rows

  • 0

I was hit with the following question today during an interview:

How many rows would the following SQL statement return given the two
tables A and B, where both A and B each have exactly 10 rows?:
Select * from A, B;

My answer was the obvious one: 20. However, my interviewer told me that it was allegedly 100, although he said that he didn’t buy that himself. Can anyone shed some light on this?

  • 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-15T00:44:19+00:00Added an answer on June 15, 2026 at 12:44 am

    That query returns a Cartesian product of tables A and B. Every row in table A will be matched with every row in table B. 10 rows * 10 rows = 100 rows.

    You were probably interpreting that as a UNION, where all the rows in table B are appended to the bottom of the rows from table A. That query would look like this:

    SELECT * FROM A
    UNION
    SELECT * FROM B
    

    Note that this would only work if the structures of A and B were identical.

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

Sidebar

Related Questions

How to catch return hit (enter) on TextBox? The following does not work. I
Good day, my question is about optimizing sql query. The following query is slow:
I have the following tables for a php mysql based quiz application: QUESTION id
today i hit a really annoing problem with wpf. i just want to align
This question could easily take multiple paths, so I will hit the more specific
There are too many keywords in my question to google this :) I have
I've found this question many times on Google and on StackOverflow, though none answer
I am trying to install vim with the ruby interpreter. Following this stackoverflow question
Following on from my previous question , I'm looking to run some performance tests
THIS IS USING MYSQL My question is the following. I have a baseball database,

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.