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
一、查询某个字段重复
select *
from User u
where u.user_name in (select u.user_name
from User u
group by u.user_name having count(*) > 1)
二,删除表中某几个字段的重复
例:表中有条六条记录。 其中张三和王五 的记录有重复
TableA
id customer Ph