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