SQL 髢「謨ーシ壽焚蛟、髢「謨ー

荳隕ァ

髢「謨ー 蜿門セ 隨ャ莠悟シ墓焚 邨先棡
ROUND 蝗帶昏莠泌・ 蟆乗焚轤ケ莉・荳九ョ譯∵焚 ROUND(5.55 , 1) 5.6
TRUNC 蛻繧頑昏縺ヲ 蟆乗焚轤ケ莉・荳九ョ譯∵焚 TRUNC(5.55 , 1) 5.5
MOD 菴吶j MOD(10, 3) 1
GREATEST 譛螟ァ GREATEST(1, 3, 5) 5
LEAST 譛蟆 LEAST(1, 3, 5) 1

蝗帶昏莠泌・

ROUND(蟇セ雎。縲∝ョ溯。梧。∵焚)
窶サ螳溯。梧。∵焚 シ 蝗帶昏莠泌・蠕後ョ蟆乗焚轤ケ莉・荳九ョ陦ィ遉コ謨ー
竍貞ョ溯。梧。∵焚縺ョ譖エ縺ォ荳九ョ譯√ョ蝗帶昏莠泌・繧定。後≧
ROUND(555.555, 1) 竍555.6
ROUND(555.555, 2) 竍555.56
ROUND(555.554, 2) 竍555.55

ROUND(蟇セ雎。)
窶サROUND(ス,0)縺ィ蜷後§
ROUND(555) 竍555
ROUND(555.55) 竍556
ROUND(555.40) 竍555

譌・譎ゅョ蝗帶昏莠泌・
窶サ萓具シ啌OUND('15-06-22 17:30:30', 'ス')

蝗帶昏莠泌・繝ォ繝シ繝ォ
譎る俣シ夲ス11譎や貞ス捺律/12譎ゑス樞堤ソ梧律
譌・シ夲ス15譌・竊貞ス捺怦/16譌・ス樞堤ソ梧怦
譛茨シ夲ス6譛遺貞ス灘ケエ/7譛茨ス樞堤ソ悟ケエ

ROUND(譌・譎) 窶サ蠑墓焚逵∫払譎
シ抒OUND(譌・譎, 'DD')
ROUND(譌・譎, 'YYYY')
竊15-01-01 00:00:00
ROUND(譌・譎, 'MM')
竊15-07-01 00:00:00
ROUND(譌・譎, 'DD')
竊15-06-23 00:00:00
ROUND(譌・譎, 'HH')
竊15-06-22 17:00:00

ROUND(蟇セ雎。縲∝ョ溯。梧。∵焚)
窶サ螳溯。梧。∵焚 シ 蝗帶昏莠泌・蠕後ョ蟆乗焚轤ケ莉・荳九ョ陦ィ遉コ謨ー

ROUND(145.50 , 0 ) 竍 146.00(145.50)
ROUND(145.45 , 0) 竍 145.00(145.45)
ROUND(-145.50 , 0) 竍 -146.00(-145.50)
ROUND(-145.45 , 0) 竍 -145.00(-145.45)

ROUND(145.45 , 1) 竍 145.50(145.45)
ROUND(145.45 , 2) 竍 145.45(145.45[])
ROUND(145.45 , -1) 竍 150.00(145.45)
ROUND(145.45 , -2) 竍 100.00(145.45)

蛻繧頑昏縺ヲ

窶サTruncate(蛻繧雁叙繧)縺ョ逡・

TRUNC(蟇セ雎。縲∝ョ溯。梧。∵焚)
窶サ螳溯。梧。∵焚 シ 蛻繧頑昏縺ヲ蠕後ョ蟆乗焚轤ケ莉・荳九ョ陦ィ遉コ謨ー
竍貞ョ溯。梧。∵焚縺ョ譖エ縺ォ荳九ョ譯√ョ蛻繧頑昏縺ヲ繧定。後≧
TRUNC(555.555, 1) 竍555.5
TRUNC(555.555, 2) 竍555.55
TRUNC(555.559, 2) 竍555.55

TRUNC(蟇セ雎。)
窶サTRUNC(ス,0)縺ィ蜷後§
TRUNC(555) 竍555
TRUNC(555.55) 竍555
TRUNC(555.99) 竍555

譌・譎ゅョ蛻繧頑昏縺ヲ
窶サ萓具シ啜RUNC('15-06-22 17:30:30', 'ス')

TRUNC(譌・譎) 窶サ蠑墓焚逵∫払譎
シ抖RUNC(譌・譎, 'DD')
TRUNC(譌・譎, 'YYYY')
竊15-01-01 00:00:00
TRUNC(譌・譎, 'MM')
竊15-06-01 00:00:00
TRUNC(譌・譎, 'DD')
竊15-06-22 00:00:00
TRUNC(譌・譎, 'HH')
竊15-06-22 17:00:00
TRUNC(譌・譎, 'MI')
竊15-06-22 17:30:00
TRUNC(譌・譎, 'SS')
竊偵お繝ゥ繝シ

菴吶j

MOD(10, 3)
竍 1

Follow me!