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
比如,表:event(id int(10) auto_increment primary key, sid int(10)not null, detail text)
我想删除表event中sid重复的记录,请问有没有这样SQL语句?或是通过其它方法? 代码如下:delete from event as e where id != (select min(id) from event where sid=e.sid); or