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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:05:00+00:00 2026-05-12T19:05:00+00:00

I have two table like this table_CN (_id, name, phone, favorite, title) table_EN (_id,

  • 0

I have two table like this

  • table_CN (_id, name, phone, favorite, title)
  • table_EN (_id, name, phone, favorite)

Then I select _id value from two table

SELECT _id, name, phone, favorite FROM table_CN where _id='15'UNION SELECT _id, name, phone, favorite FROM table_EN where _id='15'

After that I don’t know how to determine which table name to update data, can I do that with SQL query? I’m confusing here!

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

    You can add the table name to the result manually:

    SELECT _id, name, phone, favorite, 'table_CN' AS table_name FROM table_CN where _id='15' UNION
    SELECT _id, name, phone, favorite, 'table_EN' AS table_name FROM table_EN where _id='15'
    

    Btw, is there a reason to not use a table like _id, lang, name, phone, favorite, title, PRIMARY KEY (_id, lang)?

    • 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 like user table-u userid | name 1 | lenova
I have two table like below CREATE TABLE IF NOT EXISTS `countries` ( `id`
I have got two tables: tbl_sms tbl_bids The above two table holds something like
First, a little background (greatly simplified): I have two classes, one called Entity and
Here's my dilemma - I have a two-column list of elements (styled <div> s)
This question requires some hypothetical background. Let's consider an employee table that has columns
For this question, I'm looking to see if anyone has a better idea of
I'm dealing with sql and my sql is not as good as my ruby,
I'm trying to create a rating system, where the user can rate pictures/videos/audio etc.
What's the best way to save my MySQL data model and automatically apply changes

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.