yayaya2825 2021.06.16 16:31 Views : 281
숫자에 천단위 콤마를 찍으려고 합니다.
FORMAT함수를 사용해서 적용할 수 있다는건 알아냈지만 소수점 단위가 고정되어있지 않아서..
이런 경우에는 어떻게 해야될까요?
2021.06.17 12:04
select concat(format(x, 0), mod(x, FLOOR(x))) from ( select 1000000000.123 as x ) a
대략 이런 식... 소수점 이하 자리를 맞추고 싶다면 손을 좀 더 심 되요
cmd_comment_vote_user Upvote0 Downvote0 Comment
Drop your files here, or click the button to the left.
Maximum File Size : 0MB (Allowed extentsions : *.*)
Uploading... (0%)
Keep me signed in.
select
concat(format(x, 0), mod(x, FLOOR(x)))
from (
select 1000000000.123 as x
) a
대략 이런 식... 소수점 이하 자리를 맞추고 싶다면 손을 좀 더 심 되요