2013年10月11日

oracle中的returning的返回值

摘要: 看到一篇关于returning返回值的文章,感觉不错,就贴了一些自己觉得喜欢的内容在这里。原文链接如下:http://lasombra.iteye.com/blog/458512oracle returning在insert, update 和delete操作的返回值,测试代码如下create table t (id int, name varchar2(20));declarev_name varchar2(20);begin insert into t values( 1, 'Ming') returning name into v_name; dbms_output.pu 阅读全文

posted @ 2013-10-11 22:34 明宇 阅读(941) 评论(0) 推荐(0) 编辑

oracle 游标小例

摘要: sqlplus 更新游标 阅读全文

posted @ 2013-10-11 22:07 明宇 阅读(170) 评论(0) 推荐(0) 编辑

oracle限定返回结果集的行数

摘要: 在mysql中,可以通过limit限制返回结果集的行数,如:select * from user_table limit 2;返回了user_table的前两行,在oracle中没有limit,如果oracle要得到同样的结果,则:select * from user_table where rownum 10 and rownum < 21;而是应该写成结果集相减的形式:select * from user_table where rownum < 21minusselect * from user_table where rownum < 11; 阅读全文

posted @ 2013-10-11 20:26 明宇 阅读(757) 评论(0) 推荐(0) 编辑

导航