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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:58:36+00:00 2026-05-30T13:58:36+00:00

I have two tables, I am wondering whether is it possible to write a

  • 0

I have two tables, I am wondering whether is it possible to write a single query on these two table but they are not connected to each other?

some sample code snippet whould be great helpful for my understanding.

Table: Payment

Payment_id  Payment_status  amount
1  1001          201            400
2  1002          403            450
3  1003          204            460

after running query : SELECT Payment_status FROM Payment GROUP BY Payment_staus

it gives me result like :

Payment_staus
1 201
2 403
3 204

I have one more table named status_code as

  code    description
1 201     In progress
2 403     Complete
3 204      On Hold

In above query I want Payment_staus and their respective description , the result should look like this

   Payment_status  description 
1    201            In progress
2    403            Complete
3    204            On Hold
  • 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-05-30T13:58:37+00:00Added an answer on May 30, 2026 at 1:58 pm

    A Cartesian join (note there is no JOIN condition). All possible combinations of records are in the results:

    tableA (charfield Char(2))
    tableB (numberfield Number(1))
    
    INSERT 'A' INTO tableA;
    INSERT 'B' INTO tableA;
    INSERT 1 INTO tableB;
    INSERT 2 INTO tableB;
    
    SELECT * 
    FROM   tablea CROSS JOIN tableb
    

    Results:

    charfield|numberfield
    =====================
    A        |1
    A        |2
    B        |1
    B        |2    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering if this is possible in SQL. Say you have two tables A
I have two tables: Table 1: ID, PersonCode, Name, Table 2: ID, Table1ID, Location,
I'm wondering if anyone has faced this issue. Let's assume I have two tables:
I have two tables and a foreign_key index table: table xymply_locations id name lat
I have two tables, records are being continuously inserted to these tables from outside
I was wondering, if we have two tables that share one column in common
I have two tables with a many-to-one relationship. (Oracle) **Table: PARENT** Field: A (PK)
So I have two seperate tables. In the first table, there are a bunch
I have two selects which are required to filter data. They are not complicated:
I have two tables: Items and Colors. They have a many to many relation.

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.