Trunc
常見(jiàn)例句
- Trunc: Truncates a real number to an integer.
實(shí)數(shù)截尾為整型數(shù),肯定會(huì)存在誤差的。 - When we specify a format as an input to the ROUND and TRUNC functions, things become a bit more involved, but the concepts of rounding and truncating still remain the same.
因?yàn)闀r(shí)間已經(jīng)超過(guò)中午的12點(diǎn),距離第二天的時(shí)間比距離當(dāng)天起始時(shí)間要近,所以Round函數(shù)返回第二天的起始時(shí)間,但是Trunc函數(shù)依然返回輸入時(shí)間的起始部分,這一點(diǎn)和對(duì)小數(shù)進(jìn)行四舍五入和截取相似。 - SELECT TRUNC(7.7788,2) FROM DUAL; 249. COUNT
計(jì)算滿(mǎn)足條件的記錄數(shù). - ofstream ofile("D:\\v.txt", ios_base::binaryios_base::trunc);
我需要的是二進(jìn)制的不是這種明文的! - select firstnme,trunc(salary/30,0) as "日薪金" from employee ;
顯示在一個(gè)月為30天的情況所有員工的日薪金;忽略余數(shù). - ALTER SNAPSHOT SCADA_DATASN REFRESH FAST START WITH trunc(SYSDATE)+22/24 NEXT (SYSDATE)+1/2;
我在數(shù)據(jù)庫(kù)里建了12個(gè)快照,刷新方式均為FAST,刷新時(shí)間我如下設(shè)制, 返回 Trunc