Return all numbers with more then 2 decimal digits in MySQL
mysql
Solution
You can do something like this :-
SELECT *
FROM `table`
WHERE LENGTH(SUBSTR(`summ `,INSTR(`summ `,"."))) >3
Problem
I have data similar to this in my database: ``` +----+----------------+ | id | summ (varchar) | +----+----------------+ | 1 | 30.23 | | 2 | 10.235 | | 3 | 20.2300 | | 4 | 100.005 | | 5 | 5.031 | | 6 | 0.0010002 | +----+----------------+ ``` How can I receive all data, in MySQL query that has more then 2 decimal digits ( zeros also count )? At start I had to get only the ones, that have 3 digits and end with 5, so I used this command `substring( summs * 100, -2 ) = '.5'`, but I have no idea how to get the various numbers.