Page 1 of 1

copy info from one field to another

Posted: Tue Mar 01, 2005 6:43 am
by pleigh
is there a way that i can copy an info from, for example, i have 3 date fields namely:

date previousdate postupdate
----- -------------- *******

is there a way that i can update the field previousdate and copy the content of the postupdate, in this case, i want to copy the asterisks to previousdate then update new postupdate?

Posted: Tue Mar 01, 2005 6:52 am
by CoderGoblin

Code: Select all

UPDATE tablename SET  postupdate=previousdate WHERE condition;
Should work (Need a condition such as "id=X" or would update all rows).