
USE mytools;
DROP TABLE IF EXISTS split_float;
CREATE TABLE split_float (height CHAR(10));

INSERT INTO split_float VALUES ("12.3");
INSERT INTO split_float VALUES ("45.6");
INSERT INTO split_float VALUES ("78.9");
INSERT INTO split_float VALUES ("-3.4");
SELECT * FROM split_float;

--DELETE
--FROM split_float
--WHERE height < 1;

SELECT CAST(SUBSTRING_INDEX(height, '.', 1) AS UNSIGNED) AS whole_value,
   CAST(SUBSTRING_INDEX(height, '.', -1) AS UNSIGNED) AS decimal_value
FROM split_float;

