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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:22:26+00:00 2026-06-13T20:22:26+00:00

I asked this question on another post which have me a basic query but

  • 0

I asked this question on another post which have me a basic query but still not working when executing the following nothing happens any ideas?

UPDATE mage_catalog_product_entity_varchar 
  SET value = (SELECT value WHERE attribute_id = 703) 
  WHERE attribute_id = 106;

So I am updating the value in the value column if the attribute_id column = 106 but only updating from the value column where the attribute_id column = 703

The following query also updates 0 in the value fields corresponding to attribute_id 106

UPDATE mage_catalog_product_entity_varchar 
  SET value = (SELECT value from mage_catalog_product_entity_varchar 
  WHERE attribute_id = 703) WHERE attribute_id = 106;
  • 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-06-13T20:22:27+00:00Added an answer on June 13, 2026 at 8:22 pm

    You are missing the From clause in the sub query. Can you recheck it once

    UPDATE mage_catalog_product_entity_varchar 
      SET value = (SELECT value WHERE attribute_id = 703) 
      WHERE attribute_id = 106;
    

    It should be (MYSQL doesn’t updates the table if it is used in the inner query directly)

    UPDATE mage_catalog_product_entity_varchar a, 
       mage_catalog_product_entity_varchar b
        SET a.value = b.value WHERE a.attribute_id = 106
         AND b.attribute_id = 703;
    

    You can also find the solution on SQL Fiddle 1

    MySQL gives the error “You can’t specify target table ‘table_name’ for update in FROM clause” For knowing more about this error, you can visit the topic

    MySQL #1093 – You can't specify target table 'giveaways' for update in FROM clause

    If you will have more than one entries in the table discussed corresponding to attribute id 703, then the query will take value from the first record inserted and the other one will be ignored.

    You can see this condition here SQL Fiddle 2

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

Sidebar

Related Questions

I asked this question earlier. I am intrigued by std::set but I have another
I've asked this question as a comment on another post but couldn't get it
I asked this question earlier but regarding another programming languages. Let's say I have
I sort of asked this question at the end of another post but feel
I asked this question in another post - How do I put a <div>
This question is related to another question I asked Basically, I have 2 horizontally
I asked another version of this question on the gamedev.SE site earlier today but
I'm sure this was asked somewhere in another question, but the wording used there
I asked this question about a year ago on another site but never got
I have the same question that was asked in another post except I'm having

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.