This is a discussion on Moving data from one column to another within the MySQL forums, part of the Database Server Software category; --> ....still a bit new to sql/mysql. ....not sure what to search under yet for the following task: ...perhaps someone ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| ....still a bit new to sql/mysql. ....not sure what to search under yet for the following task: ...perhaps someone would be kind enough to provide the correct command ....trying to move the value of one column to another column within the same table. e.g., if column1 = 6 and column2 = 9 to start and I move column1 to column2 the result should be that column 2 = 6 and column 1 can remain at 6. Thanks Jeff -- Posted via a free Usenet account from http://www.teranews.com |
| ||||
| "Jeff" <none@nothingX.com> schreef in bericht news:4637e914$0$16371$88260bb3@free.teranews.com.. . > > ...still a bit new to sql/mysql. > > ...not sure what to search under yet for the following task: ...perhaps > someone would be kind enough > to provide the correct command > > ...trying to move the value of one column to another column within the > same table. > > e.g., if column1 = 6 and column2 = 9 to start and I move column1 to > column2 > > the result should be that column 2 = 6 and column 1 can remain at 6. > > Thanks > > Jeff > > > -- > Posted via a free Usenet account from http://www.teranews.com > UPDATE foo SET column2 = column1 WHERE column1 = 6 AND column2 = 9; HTH |