Oracle 取Group By 第一条
摘要:select *from (select emp.*,row_number() over(partition by deptno order by rownum) cn from emp)where cn = 1;
阅读全文
posted @
2015-04-29 14:53
水月无痕
阅读(7194)
推荐(0)
Oracle Merge
摘要:原文地址:http://blog.csdn.net/inthirties/article/details/4731930Merge是一个非常有用的功能,类似于Mysql里的insert into on duplicate key. Oracle在9i引入了merge命令, 通过这个merge你能够...
阅读全文
posted @
2015-01-29 20:46
水月无痕
阅读(179)
推荐(0)
Oracle学习(二)table函数的用法
摘要:原文地址:http://blog.csdn.net/lne818/article/details/3042250 PL/SQL表---table()函数用法/*PL/SQL表---table()函数用法:利用table()函数,我们可以将PL/SQL返回的结果集代替table。oracle内存表在查...
阅读全文
posted @
2014-09-24 12:14
水月无痕
阅读(1602)
推荐(0)
Oracle学习(一)
摘要:1、创建一个对象:create or replace type sys_col_id as object(id number(38))2、定义一个数组create or replace type sys_tbl_ids as table of sys_col_id3、算出分隔符的长度,用法:spli...
阅读全文
posted @
2014-09-24 12:02
水月无痕
阅读(157)
推荐(0)
oracle查询锁表解锁语句 (转)
摘要:原文地址:http://blog.csdn.net/zhldt2008/article/details/79539321. 如下语句 查询锁定的表: SELECT l.session_id sid, s.serial#, l.locked_mode,l.oracle_username, l.os_...
阅读全文
posted @
2014-08-26 14:20
水月无痕
阅读(212)
推荐(0)
Oralce 时间TIMESTAMP的比较
摘要:CreatedDate >= TIMESTAMP '2014-04-01 00:00:00.00'
阅读全文
posted @
2014-07-02 20:30
水月无痕
阅读(187)
推荐(0)
oracle时间差的算法
摘要:天:ROUND(TO_NUMBER(END_DATE - START_DATE))小时:ROUND(TO_NUMBER(END_DATE - START_DATE) * 24)分钟:ROUND(TO_NUMBER(END_DATE - START_DATE) * 24 * 60)秒:ROUND(TO...
阅读全文
posted @
2014-06-23 15:12
水月无痕
阅读(191)
推荐(0)
Oracle中insert into select和select into的用法(转)
摘要:原文地址:http://hi.baidu.com/huahua035/item/87d5e71e6a7d31f187ad4ea5两张表进行数据的拷贝,最常用的拷贝语句是:insert into select 和 select into from但是请绝对的注意:在Oracle中select into...
阅读全文
posted @
2014-05-20 15:19
水月无痕
阅读(19745)
推荐(1)
Oralce 存储过程一
摘要:create or replace procedure InsertBankInfo is v_legalentityid ba_entity.legalentityid%type; v_BankId fi_bankaccount.bankid%type; v_Bankaccou...
阅读全文
posted @
2014-04-17 20:18
水月无痕
阅读(175)
推荐(0)
Oracle 随手记录
摘要:一、判断某列是否是数字:trim(translate(字段, '0123456789', ' ')) is NULL
阅读全文
posted @
2014-04-01 13:49
水月无痕
阅读(134)
推荐(0)
.android sqlite limit语法(转)
摘要:原文地址:http://jayzhou215.blog.163.com/blog/static/132713533201232752510450/网上有的说法是sqlite3 中limit n,m语法无效,实际是错误的。正确的语法是The two syntax forms are a little confusing because they reverse the numbers:LIMIT <skip>,<count>Is equivalent to:LIMIT <count> OFFSET <skip>LIMIT <跳过的数据数目&g
阅读全文
posted @
2012-10-22 10:47
水月无痕
阅读(721)
推荐(0)