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

ORACLE to_char(),to_date()用法

to_date() function
1.日期格式参数 含义说明 
D 一周中的星期几 
DAY 天的名字,使用空格填充到9个字符 
DD 月中的第几天 
DDD 年中的第几天 
DY 天的简写名 
IW ISO标准的年中的第几周 
IYYY ISO标准的四位年份 
YYYY 四位年份 
YYY,YY,Y 年份的最后三位,两位,一位 
HH 小时,按12小时计 
HH24 小时,按24小时计 
MI 分 
SS 秒 
MM 月 
Mon 月份的简写 
Month 月份的全名 
W 该月的第几个星期 
WW 年中的第几个星期    
 
2.日期时间间隔操作
当前时间减去7分钟的时间
select sysdate,sysdate - interval '7' MINUTE from dual
当前时间减去7小时的时间
select sysdate - interval '7' hour from dual
当前时间减去7天的时间
select sysdate - interval '7' day from dual
当前时间减去7月的时间
select sysdate,sysdate - interval '7' month from dual
当前时间减去7年的时间
select sysdate,sysdate - interval '7' year from dual
时间间隔乘以一个数字
select sysdate,sysdate - 8 *interval '2' hour from dual
 
to_char() function
The following are number examples for the to_char function.
to_char(1210.73, '9999.9')
would return '1210.7'
to_char(1210.73, '9,999.99')
would return '1,210.73'
to_char(1210.73, '$9,999.00')
would return '$1,210.73'
to_char(21, '000099')
would return '000021'
 
The following is a list of valid parameters when the to_char function is used to convert a date to a string. These parameters can be used in many combinations.
 
Parameter
Explanation
YEAR
Year, spelled out
YYYY
4-digit year
YYY
YY
Y
Last 3, 2, or 1 digit(s) of year.
IYY
IY
I
Last 3, 2, or 1 digit(s) of ISO year.
IYYY
4-digit year based on the ISO standard
Q
Quarter of year (1, 2, 3, 4; JAN-MAR = 1).
MM
Month (01-12; JAN = 01).
MON
Abbreviated name of month.
MONTH
Name of month, padded with blanks to length of 9 characters.
RM
Roman numeral month (I-XII; JAN = I).
WW
Week of year (1-53) where week 1 starts on


相关文档:

Oracle JDBC 自带连接池

 http://www.diybl.com/course/3_program/java/javajs/2008429/111906.html
如果要使用池的话,就必须使用OracleConnectionCacheImpl,共有三种池的策略:
DYNAMIC_SCHEME(是动态增加.用完如果超过上限则关掉)
The cache will create connections above the specified maximum limit
when necessary   but ......

Oracle RETURNING INTO 用法示例

The RETURNING INTO clause allows us to return column values for rows affected by DML statements. The following test table is used to demonstrate this clause.
DROP TABLE t1;
DROP SEQUENCE t1_seq;
CREATE TABLE t1 (
id NUMBER(10),
description VARCHAR2(50),
CONSTRAINT t1_pk PRIMARY KEY (id) ......

ORACLE数据库的数据导入方法

以 下七种数据导入方法哪个最适用需要针对具体情况具体分析,我也附带列举了影响导入速度的各种因素供斟酌。为了比较各种数据导入方法的效果,我创建了示例表 和数据集,并用各种方法导入示例数据集来计算总体导入时间和导入进程占用 CPU 时间,这里得出的时间仅供参考。需要说明的是,建议你使用 Oracle 9i 企业版数据库, ......

Oracle基础知识

Q1.怎样创建表?
Q2.怎样删除表?
Q3.怎样创建视图?
Q4.怎样删除视图?
Q5.怎样给表添加字段?
Q6.怎样删除表中某个字段?
Q7.怎样给某个字段添加约束?
Q8.怎样去除某个字段上的约束?
Q9.怎样给表加上主键?
Q10.怎样删除表的主键?
Q11.怎样给表添加一个外键?
......

C# 读取和写入oracle的blob字段的方法

 //向数据库中写入
        private void button1_Click(object sender, EventArgs e)
        {
            oracleConnection1.Open();
      & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号