Skip to content
Advertisement

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

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.

Advertisement

Answer

You could do it with some simple math

SELECT 143.42 div 10 % 10;

SQL Fiddle

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement