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

  • Home
  • SEARCH
  • 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 509817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:03:00+00:00 2026-05-13T07:03:00+00:00

If i have tables such as: table_1: 1, ‘Hello My Name is Hal’, ‘2009:11:02

  • 0

If i have tables such as:

table_1: 1, 'Hello My Name is Hal', '2009:11:02 08:42'
table_1: 2, 'Hello My Name is Dave', '2009:11:02 08:30'
table_2: 1, 'Ima all #red due to twitter', '2009:11:02 09:42'

And lets imagine all the table columns have the same col_names

Is there any way i can do a query to return the results in one SELECT on different Rows

Something Along the lines of:

SELECT * FROM table_1, table_2 ORDER BY dateReg DESC

So my Return will look like:

1, 'Ima all #red due to twitter', '2009:11:02 09:42'
1, 'Hello My Name is Hal', '2009:11:02 08:42'
2, 'Hello My Name is Dave', '2009:11:02 08:30'

When I try to run the above query I get Ambiguity Errors (Obviously…Duhh..:D) but is there a way we can do that in query rather than sorting in code using PHP.

Any Ideas? Thanks in advance

  • 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-13T07:03:00+00:00Added an answer on May 13, 2026 at 7:03 am

    You can use UNION (or UNION ALL) to combine results from multiple queries:

    SELECT * FROM table_1 UNION ALL SELECT * FROM table_2
    

    (Simple UNION will remove duplicates, UNION ALL will return all results.)

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

Sidebar

Related Questions

If I have two tables such as this: CREATE TABLE #table1 (id INT, name
I have 2 tables such as below: Table 1 contain UserID and Name while
i have such mysql db table: id name surname number 1 emil asadi 26
I have Messages and User models with corresponding tables. The Messages table has such
I have such tables in my database like Customer , Member , Instructor ,
If I have a table such as: info_name | info_value name | Susan desc
I have 3 tables in my database, for example with such names: TableA, TableB,
Lets say I have a table with columns such as: ID Name City State
I have two mysql tables such as countriesRanking table country, clicks ------- ----- 0
I have two tables such as DTTable1 and DTTable2. It has the following records.

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.