Link to home
Start Free TrialLog in
Avatar of sabecs
sabecs

asked on

MySQL - copy data from one column to another in the same table

I have a table as shown below, how can I copy the contents from itemName to itemDescb
I need to copy from one column to another column in the same table.


CREATE TABLE `products` (
  `PID` int(11) NOT NULL auto_increment,
  `prodcode` varchar(10) default NULL,
  `cat` varchar(40) NOT NULL default '',
  `subcat` varchar(40) default NULL,
  `itemName` varchar(50) default NULL,
  `itemDesc` text,
  `itemDescb` varchar(40) default NULL,
  `itemPrice` decimal(6,2) default '0.00',
  `special` decimal(6,2) default NULL,
  PRIMARY KEY  (`PID`),
  UNIQUE KEY `id` (`PID`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

Thanks in advance for your help.
ASKER CERTIFIED SOLUTION
Avatar of Raynard7
Raynard7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sabecs
sabecs

ASKER

Thanks Raynard7.
no worries - glad to help