Solved

MySQL Update

Posted on 2013-11-13
2
341 Views
Last Modified: 2013-11-13
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
0
Comment
Question by:Brogrim
2 Comments
 
LVL 5

Accepted Solution

by:
warddhooghe earned 500 total points
ID: 39644591
update table inner join other_table
set ... etc
0
 

Author Closing Comment

by:Brogrim
ID: 39644687
as Homer would say DOH, thank you
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
sql statement - php 5 46
PHP get months from date search query where user 40 53
mySql Syntax 7 27
Selecting specific rows 3 34
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now