passer1991

随笔分类 -  oracle

如何将oracle.sql.TIMESTAMP 转换为 java date
摘要:private String getDate(Object value) { Timestamp timestamp = null; try { timestamp = (Timestamp) value; } catch (Exception e) { timestamp = getOracleTimestamp(value); } if(timestamp!=null) return (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S")) .format(timestamp); else return null; } /** * 阅读全文

posted @ 2014-01-05 16:34 passer1991 阅读(2540) 评论(0) 推荐(0)

在不知道用户名密码的情况下登录oracle数据库
摘要:conn / as sysdba 阅读全文

posted @ 2013-12-14 22:01 passer1991 阅读(161) 评论(0) 推荐(0)

oracle导出
摘要:exp userid=xiaoming/pwd123@orcl owner=xiaoming file=d:\emp5.dmp导出用户名为xiaoming,密码为pwd123,数据库为orcl,拥有者为xiaoming的数据库到d:\emp5.dmp 阅读全文

posted @ 2013-10-21 21:21 passer1991 阅读(110) 评论(0) 推荐(0)

ORACLE 自动提交问题
摘要:于是写测试程序。。。不行下载最新的ODBC。。。还是不行通过sql plus查询。。。咦?竟然也查不到。。。于是,折腾。。。折腾。。。几个小时后,问题找到,原来PL/SQL DEVELOPER 默认不是自动提交,当关掉sql window窗口后或手动commit方进行数据的提交,我靠,真隐晦。。。更改选项,插入,查询,一切OK了,唉,宝贵的时间啊。tool-preferences 阅读全文

posted @ 2013-10-09 22:26 passer1991 阅读(383) 评论(0) 推荐(0)

PLSQL怎样导出oracle表结构
摘要:tools->export tables 是导出表结构还有数据tools->export user objects是导出表结构可以用tools->export tables用中间的sql inserts页面,选中create tables选项,where clause 里写入 where rownum<1。如果表包含有CLOB类型字段的话,sql是无法导出的。这时候可以改用PL/SQL的pde格式进行导出。使用pl/sql developer导出oracle表结构及数据 阅读全文

posted @ 2013-10-02 18:16 passer1991 阅读(178) 评论(0) 推荐(0)

从命令行启动oracle服务
摘要:启动监听:sc start OracleOraDb10g_home1TNSListener启动服务:sc start OracleServiceORCL 阅读全文

posted @ 2013-10-01 11:14 passer1991 阅读(380) 评论(0) 推荐(0)

oracle 查看主外键约束
摘要:select *from user_constraints a, user_constraints b where a.constraint_type = 'R' and b.constraint_type = 'P' and a.r_constraint_name = b.constraint_name 阅读全文

posted @ 2013-07-04 21:15 passer1991 阅读(342) 评论(0) 推荐(0)

Oracle to_char格式化函数
摘要:http://www.cnblogs.com/jiangchongwei/archive/2011/05/02/2034273.htmlhttp://www.cnblogs.com/reborter/archive/2008/11/28/1343195.html 阅读全文

posted @ 2013-06-17 21:58 passer1991 阅读(149) 评论(0) 推荐(0)

用oracle导出表结构步骤详解
摘要:http://www.qnr.cn/pc/ora/study/201008/526195.html 阅读全文

posted @ 2013-06-14 14:56 passer1991 阅读(198) 评论(0) 推荐(0)

Hibernate基础之五:自增主键@GeneratedValue、@SequenceGenerator
摘要:http://blog.csdn.net/ruantao1989/article/details/8147072 阅读全文

posted @ 2013-06-14 14:31 passer1991 阅读(201) 评论(0) 推荐(0)

oracle 的字符串
摘要:--两个竖线可以把前后两个字符串连接起来select upper(substr(xm,1,1))|| lower(substr(xm,2,length(xm)-1)) from student; 阅读全文

posted @ 2013-05-19 09:11 passer1991 阅读(92) 评论(0) 推荐(0)

oracle 的分页
摘要:select * from (select rownum rn , t1.* from ( select * from emp order by empno ) t1 where rownum =5 ;select * from emp where rowid in (select rid from (select rid from (select rownum rn,rid from (select rowid rid ,empno from emp) where rownum =5)) order by empno; 阅读全文

posted @ 2013-05-18 20:55 passer1991 阅读(104) 评论(0) 推荐(0)

导航