You can also use below ...
select substring_index(field1,'.',1), substring_index(field1,'.',-1) from table1;
Output example
mysql> select substring_index(120.45,'.',1), substring_index(120.45,'.',-1) ; +-------------------------------+--------------------------------+ | substring_index(120.45,'.',1) | substring_index(120.45,'.',-1) | +-------------------------------+--------------------------------+ | 120 | 45 | +-------------------------------+--------------------------------+ 1 row in set (0.00 sec)
Phaneendra
source share