oracl 和db2 常用语法比较: 1、取前N条记录 Oracle:Select * from TableName where rownum <= N; DB2:Select * from TableName fetch first N rows only; 2、取得系统日期 Oracle:Select sysdate from dual; DB2:Select current timestamp from sysibm.sysdummy1; 3、空值转换 Oracle:Select
PS:下面是转过来的,用于记录下,这个不是正则的初衷,只是用了REGEXP而已,正则的更灵活更方便 将comment表中的author_url包含www.sohu.com的记录,其中的sohu替换为sina,一个语句搞定~ update comment set author_url=REPLACE(author_url,’sohu’,’sina’) where author_url REGEXP ‘www.sohu.com’; 带IF判断的复杂替换 update comment set url=