I need to change format from varchar(10) to decimal. When I alter the table the data is trimmed.
What I'm doing wrrong?
TH
can you explain more - what database, and are you just using the ALTER TABLE syntax?
You could add a new decimal row, copy the values into it making sure it's the right format, drop the original row and then rename the copied one.
alter table a modify field pay decimal(6,2)