SQL Batch Copy/Insert
Posted on 2008-11-20
I need some help...
I have a database which has a table called 'clients'. Each 'client' has an 'address' column containing their address. There now exists a second column called 'invoice_address' as many of our clients have a different Invoice address. I have roughly 400 client records. To make matters easier I would like to copy the current address of each, as the default for the invoice address and then change only those that differ manually.
So essentially I need a query that would allow me to copy one column of data to another, within the same table, for each record. Can this be achieved with a single SQL statement?
I hope I have expressed the scenario clearly and that someone can help. I am on standby to answer any questions.
P.S - My Database is MySQL and supports a custom PHP intranet system. DBMS is phpMyAdmin.