Link to home
Start Free TrialLog in
Avatar of Brogrim
BrogrimFlag for Ireland

asked on

MySQL Update

I have wrote a statement to identify the columns I want to update

select female_names_males.cname, tbl.cname, tbl.genderid from female_names_males
inner join tbl on female_names_males.cname = tbl.cname 
where tbl.genderid = '2'

Open in new window


This runs fine and identifies the rows between both tables

I now want to update the rows and thought this would work

Update tbl
set tbl.genderid = '1'
inner join tbl on female_names_males.cname = tbl.cname 
where tbl.genderid = '2'

Open in new window


Any Ideas
ASKER CERTIFIED SOLUTION
Avatar of warddhooghe
warddhooghe
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brogrim

ASKER

as Homer would say DOH, thank you