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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:10:11+00:00 2026-06-01T05:10:11+00:00

mysql> SELECT Ext, Pass, Name, Context FROM temp_Users WHERE temp_Users.Pass NOT IN (SELECT Pass

  • 0
mysql> SELECT Ext, Pass, Name, Context FROM temp_Users WHERE temp_Users.Pass NOT IN (SELECT Pass FROM Users);
+------+-------+---------+------------+
| Ext  | Pass  | Name    | Context    |
+------+-------+---------+------------+
| 6003 | Hello | WebPone | DLPN_Admin |
+------+-------+---------+------------+
1 row in set (0.00 sec)


mysql> UPDATE Users
    -> SET (Pass, Name, Context) = (SELECT  Pass, Name, Context FROM temp_Users WHERE temp_Users.Pass NOT IN (SELECT Pass FROM Users))
    -> WHERE Users.Ext = temp.Ext;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(Pass, Name, Context) = (SELECT  Pass, Name, Context FROM temp_Users WHERE temp_' at line 2

I want to update my database from Select result and i am getting this error. Please tell me how i can resolve it ?

  • 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-01T05:10:12+00:00Added an answer on June 1, 2026 at 5:10 am

    MySQL doesn’t support the SET ( multiple_fields ) = ( subquery_that_returns_multiple_fields ) syntax for UPDATE statements. Instead, you have to use a “multiple-table” update (a join). See http://dev.mysql.com/doc/refman/5.6/en/update.html.

    Your query has some other problems as well, so I’m not clear on exactly what you want . . . but I think you want something like this:

    UPDATE users
      JOIN temp_users
        ON temp_users.ext = users.ext
       SET users.pass = temp_users.pass,
           users.name = temp_users.name,
           users.context = temp_users.context
     WHERE temp_users.pass NOT IN
            -- extra subquery to bypass MySQL limitation:
            ( SELECT pass
                FROM ( SELECT pass
                         FROM users
                     ) t
            )
    ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In MySQL Select 1 from mytable and select null from mytable both return the
This is not allowed in Mysql: SELECT CAST(0 as DOUBLE) as ZERO How do
How to set default VALUE in SubQuery result using mysql SELECT p.`id`, p.`name`, p.`class_name`,
mysql_select_db(grozavco_gallery, $con); $result = mysql_query(SELECT * FROM Images); while($row = mysql_fetch_array($result)) { echo '<div
I have the following MYSQL SELECT T2.name as username, T2.id as userid, T2.lastactivity as
mysql_connect(localhost,root,); mysql_select_db(hitnrunf_db); $result=mysql_query(select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '' TERMINATED
I have this query in MySQL: SELECT pr.*, pr7.value AS `room_price_high` FROM `jos_hp_properties` pr
in MySQL select * from record where register_date like '2009-10-10%' What is the syntax
Two snippets of MySQL: SELECT * FROM annoyingly_long_left_hand_table LEFT JOIN annoyingly_long_right_hand_table ON annoyingly_long_left_hand_table.id =
The original query looks like this (MySQL): SELECT * FROM books WHERE title LIKE

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.