Jump to content

convert insert to update


felito

Recommended Posts

hi

 

i have this code:

 

INSERT INTO single_user (location_home_id_location_home) 
SELECT id_location_home 
FROM location_home
WHERE location_home.location = 'London'

 

 

i am trying convert to an update but i didn't have success

 

any idea?

 

 

what i am trying:

 

update `database_charts`.`single_user` 
set `location_home_id_location_home` = id_location_home 
from location_home
where location_home.location = 'London'

 

Link to comment
https://forums.phpfreaks.com/topic/238846-convert-insert-to-update/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.