Wednesday, August 10, 2022

[FIXED] how to get number locate at 2 place before decimal point?

Issue

example: i have a number=143.42 , i want to get "4" which is locate 2 place before decimal point. what SQL command should i use? i still new in SQL, don't roast me too hard.


Solution

You could do it with some simple math

SELECT 143.42 div 10 % 10;

SQL Fiddle



Answered By - Diadistis
Answer Checked By - Marie Seifert (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.