drop table #test17; create table #test17(c1 int, c2 decimal(10,10) /*отдадим все 10 знаков на хранение дробной части*/); insert into #test17 select c,c from (select 12.34567 c) tt; -- для MSSQL Arithmetic overflow error converting numeric to data type numeric. -- The statement has been terminated. -- или в MySQL Data truncation: Out of range value for column 'c2' at row 1 insert into #test17 select c,c%1 from (select 12.34567 c) tt; select * from #test17; c1 c2 12 0.3456700000для Оракла функция mod(c, d)
Век живи, век учись, вариант выделения дробной части
Задача, положить дробное число раздельно в два столбца, воспользуемся оператором взятия остатка от деления %, это Лёха подсказал