易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle 的 Round 函數(四舍五入)函数


 
该函数用来返回一个四舍五入后的值
 
SELECT ROUND( number, [ decimalplaces ] ) from DUAL
 
參數:
必填项:number : 要处理的数值(数值表达式)
可选项:decimalplaces : 四舍五入时取的小数的位数,不填则返回整数
 
Sample :
 
select round(123.456) from dual;              得到 123
select round(123.456, 0) from dual;          得到 123
select round(123.456, 1) from dual;          得到 123.5
select round(123.456, 2) from dual;          得到 123.46
select round(123.456, 3) from dual;          得到 123.456
select round(-123.456, 2) from dual;         得到 -123.46
param = round(123.456,2) 即把123.456经四舍五入保留两位小数后的值123.46赋值给变量param


相关文档:

oracle死锁原因分析

死锁的原因
1。模拟死锁
1。1。主表
-- Create table
create table WDZ1
(
WDZ1ID NUMBER not null,
MEMO VARCHAR2(20)
)
;
alter table WDZ1
add constraint XXXXXX primary key (WDZ1ID);
1。2。从表(没有外健的索引)
-- Create table
create table WDZ2
(
WDZ2ID NUMBER not null,
WDZ1ID NUMBER,
M ......

net下如何将EXCEL导入到oracle中

开发环境 VS2008+NET3.5+ORACLE10G
数据库中表设计
CREATE TABLE CCOP (
A CHAR(20) NULL,
B CHAR(20) NULL,
C CHAR(20) NULL,
D CHAR(20) NULL
)
EXCEL的第一行前四列列名为 A B C D
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using Sys ......

oracle method

--single line method
select ascii('A') Big_A from dual;
select chr(65) A, chr(122) z, chr(223) ch3 from dual;
select concat('sigo','way') from dual;
select initcap('sigoway') from dual;
select instr('ababab','a',-1,2), instr('ababab','a',1,3) from dual;
select instrb('ababab','a',1,3) from dua ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号