LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-24-2005, 05:44 AM   #1
novaprime
Member
 
Registered: Jan 2005
Posts: 39

Rep: Reputation: 15
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?
 
Old 05-24-2005, 08:07 AM   #2
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
UPDATE tablename SET col2 = col1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating from MS-SQL server to My-SQL emailssent Linux - Networking 2 02-07-2005 02:20 PM
Which SQL is suitable for EMbedded SQL on C? hk_michael Programming 4 01-10-2005 05:07 PM
plz plz solve my route mapping problem nedian123 Linux - Networking 1 07-12-2004 09:41 PM
redhat problems plz plz help sap666 Linux - Newbie 5 07-30-2003 10:57 AM
Mandrake update help plz RecoilUK Linux - General 2 12-30-2001 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration