摘要: 字符串连接(2013-02-20)和其他数据库系统类似,Oracle字符串连接使用“||”进行字符串拼接,其使用方式和MSSQLServer中的加号“+”一样除了“||”,Oracle还支持使用CONCAT()函数进行字符串拼接,只支持两个参数oracle 数据库,某字段字符串组合输出(2013-03-12)select PORT,replace(wm_concat(NO),',',',') AS BAGNOLIST from INFO GROUP by PORT 阅读全文
posted @ 2013-03-25 11:48 心存善念 阅读(265) 评论(0) 推荐(0)
摘要: to_date:eg.to_date('01-31-1999 23:23:23','MM-DD-YYYY hh24:mm:ss')参考:http://www.cnblogs.com/ajian/archive/2009/03/25/1421063.html 阅读全文
posted @ 2013-03-25 11:47 心存善念 阅读(189) 评论(0) 推荐(0)
摘要: 事务:现象:在数据库进行删除,而在页面却还显示原因:PS/SQL默认开启事务,如果开启了事务,没有commit,则会出现以上现象输出调试:set serveroutput on;先开启才能看到dbms_output.put_line()的内容create or replace procedure BASPR isaa number;begin aa:=1; dbms_output.put_line(aa);end BASPR; 阅读全文
posted @ 2013-03-25 11:39 心存善念 阅读(1367) 评论(0) 推荐(0)
摘要: oracle 数据结构添加字段alter table tablename add(columname columtype)删除字段alter table tablename drop(columname)查看表字段结构desc tablename添加主键alert table 表名 add constraint pkKey primary key(字段列表)eg. alter table OP_LOG add constraint PK_OP_LOG primary key(OP_LOG_ID);查看所有存储过程(2013-01-18)select * from user_objects wh 阅读全文
posted @ 2013-03-25 11:25 心存善念 阅读(344) 评论(0) 推荐(0)
摘要: oracle 分页查询 分页 分别传入页数page和页大小size, select * from ( select t.,rownum rn from t WHERE rownum ⇐ pagesize ) tt where tt.rn>(page-1)*size; select * from ( 阅读全文
posted @ 2013-03-25 11:24 心存善念 阅读(263) 评论(0) 推荐(0)