SQL - How do I get only the numbers after the decimal?

后端 未结 12 2105
清酒与你
清酒与你 2020-12-03 00:57

How do I get only the numbers after the decimal?

Example: 2.938 = 938

12条回答
  •  情书的邮戳
    2020-12-03 01:00

    If you know that you want the values to the thousandths, place, it's

    SELECT (num - FLOOR(num)) * 1000 FROM table...;
    

提交回复
热议问题