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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:48:30+00:00 2026-05-10T19:48:30+00:00

A cross join performs a cartesian product on the tuples of the two sets.

  • 0

A cross join performs a cartesian product on the tuples of the two sets.

SELECT * FROM Table1 CROSS JOIN Table2 

Which circumstances render such an SQL operation particularly useful?

  • 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. 2026-05-10T19:48:30+00:00Added an answer on May 10, 2026 at 7:48 pm

    If you have a ‘grid’ that you want to populate completely, like size and color information for a particular article of clothing:

    select      size,     color from     sizes CROSS JOIN colors 

    Maybe you want a table that contains a row for every minute in the day, and you want to use it to verify that a procedure has executed each minute, so you might cross three tables:

    select     hour,     minute from     hours CROSS JOIN minutes 

    Or you have a set of standard report specs that you want to apply to every month in the year:

    select     specId,     month from     reports CROSS JOIN months 

    The problem with maintaining these as views is that in most cases, you don’t want a complete product, particularly with respect to clothes. You can add MINUS logic to the query to remove certain combinations that you don’t carry, but you might find it easier to populate a table some other way and not use a Cartesian product.

    Also, you might end up trying the cross join on tables that have perhaps a few more rows than you thought, or perhaps your WHERE clause was partially or completely missing. In that case, your DBA will notify you promptly of the omission. Usually he or she will not be happy.

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

Sidebar

Related Questions

I want to cross join the two table Query Select * from table1 cross
I'm porting a process which creates a MASSIVE CROSS JOIN of two tables. The
SELECT tblProducts.productName, tblProducts.basePrice, tblProductOptions.optionDescription FROM tblProducts CROSS JOIN tblProductOptions WHERE (tblProducts.ID = 3) AND
It is possible to write a generic function/procedure/select/somethingElse to cross-join a table against himself
I have a dropdown box which is used to select a user from a
I am trying to CROSS JOIN two tables, customers and items, so I can
Possible Duplicate: combinations (not permutations) from cross join in sql I've currently got a
How do you perform a CROSS JOIN with LINQ to SQL?
Is it possible to do a cross table join in mysql spaning different tables?
[Cross-posted from lib-curl mailing list] I have a single threaded app (MSVC C++ 2005)

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.