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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:28:06+00:00 2026-05-29T21:28:06+00:00

What would be an alternative to this SELECT i.title AS title,i.category AS category FROM

  • 0

What would be an alternative to this

SELECT  i.title AS title,i.category AS category FROM table_a  WHERE REGEXP 'news'
UNION 
SELECT i.name AS title,i.categoryname AS category FROM table_b WHERE REGEXP 'news'

without using UNION? The issue we have is that we must select more rows from table_a and UNION must have rows # match. We can fake the rows in table_b by selecting different row but it just gets to confusing when we have 7 or 8 tables to mix and none of them have same number of rows or matching names. We cant use JOIN since we have noting to join them on.

Thank you!

  • 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-29T21:28:08+00:00Added an answer on May 29, 2026 at 9:28 pm

    You can fill in the blanks with null, or some other constant that makes sense thusly:

    SELECT a, b, c, d FROM t1
    UNION
    SELECT a, b, null, 0 FROM t2
    UNION
    SELECT '', b, c, 1 FROM t3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to do something like this: $select = $myTbl->select() ->from('download_log') ->joinLeft(...... etc........
Is there any alternative to this: Organizations.Include(Assets).Where(o => o.Id == id).Single() I would like
I would like an alternative to using callback method inside of jQuery's .val() method
Would anyone like to recommend free alternative to SharePoint Portal ? We want to
Is there a Maven alternative or port for the .NET world? I would love
I am looking for a free alternative to TFS. What would be the best
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode
Would be possible to extend this kind of layout so that I can have
UPDATE : Groo's answer was marked correct as it would be a good alternative.
My existing query looks like this: SELECT id, refid, action_id, action_type, co_user_id, cust_vend_id, Aes_decrypt(cust_vend_name,

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.