I have a table in one database, call this db x. I have another database, call it y. I want to copy data from x.some_table to y.some_table. I don't want to do an exact copy of the table, because some columns don't make sense in database b. I use the following query:
INSERT INTO y.some_table (a_field) SELECT a_field FROM x.some_table;
a_filed in both tables is defined as DOULBE(17,0). If i run this: USE y; SELECT a_field FROM x;
Then I get output with full values --no floating-point truncation. However, if after insertion using the first query I showed, I get nothing but whole numbers in y's some_table.a_field. The floating-point remainders are truncated.
What am I doing wrong? Thanks.