sql - UPDATE statement for MySQL with specified fields -


I have an array that I am putting in an database with an INSERT statement below. INSERT (`total`,` from ', `name / _source`,` name`, `name / _text`,` stroke`] value (' -6 ',' '' in ' F ',' / Golf / PGA / Players / Merck + Lichshaman / 8442 / Scorecard 2014/35 ',' http: //sports.yahoo.com/golf/pga/players/Marc+Leishman/8442/scorecard/2014/ 35 ',' Marc Leishman ', '64')

Is anyone to split prices to use the UPDATE statement instead of INSERT, so that I can do something like this ...

  import_oos set (`total`,` through `,` name / _source`, `name`,` name / _text`, `stroke`) values ​​( '-6', 'F', '/ Golf / PGA / players / Mark + Leishman / 8442 / Scorecard / 2014/35', 'http: //sports.yahoo.com/golf/pga/players/Marc+Leishman / '8442 / scorecard / 2014/35', 'Mark Leishman', '64') Where 'name / _text' = 'Mark Leishman'  

Question: Is it any way to use an UPDATE statement similar to this form:

  Update mytable SET (col1, col2) values ​​('val1', 'val2') where something like some = 'someval'  

A: No, < Code> UPDATE for any statement Intaks not

UPDATE statement is very specific there is no need to repeat the document. Ref:


It is not clear what you are trying to achieve. So I hesitate to recommend the INSERT ... key update of duplicates ... , although it is a useful pattern of "refreshing" table from a source file (if the table contains a unique key , And a value for the unique key provided in the source.)

I also hesitate to advise to load a temporary table using INSERT , and After that a multi-table temporary In

statement to update the update target table Ika.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -