Oracleでtrunc()で数字を切り捨てるサンプル

2017年9月19日

select trunc(123.458) from dual –123

select trunc(123.458,0) from dual –123

select trunc(123.458,1) from dual –123.4

select trunc(123.458,-1) from dual –120

select trunc(123.458,-4) from dual –0

select trunc(123.458,4) from dual –123.458

select trunc(123) from dual –123

select trunc(123,1) from dual –123

select trunc(123,-1) from dual –120

Oracle

Posted by arkgame