LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   SQL Update help plz (https://www.linuxquestions.org/questions/linux-software-2/sql-update-help-plz-326543/)

novaprime 05-24-2005 05:44 AM

SQL Update help plz
 
this isn't really a 'linux' question, but you guys are smart so hopefully someone will have an idea how to do this:

Using MySQL,

I need to find a way to, well, what would in effect be running many "update" queries in 1. heres what im trying to do:

I have a column, name it col1. It has data in it already, I have added a new column, name it col2. I need to copy all info in col1 to col2 on every row. Short of running an update query for every row in the table, I dont know how to do this.

any ideas?

zeos 05-24-2005 08:07 AM

UPDATE tablename SET col2 = col1


All times are GMT -5. The time now is 06:21 AM.