Subject | Re: delete duplicate row |
---|---|
Author | legrand_legrand_63 |
Post date | 2006-12-12T19:25:20Z |
Try this :
create table t (id numeric);
insert into t values (1);
insert into t values (2);
insert into t values (3);
insert into t values (3);
insert into t values (4);
commit;
select * from t;
select id from t a where a.rdb$db_key !=
(select first 1 b.rdb$db_key from t b where a.id=b.id);
delete from t a where a.rdb$db_key !=
(select first 1 b.rdb$db_key from t b where a.id=b.id);
Regards
PAscal
create table t (id numeric);
insert into t values (1);
insert into t values (2);
insert into t values (3);
insert into t values (3);
insert into t values (4);
commit;
select * from t;
select id from t a where a.rdb$db_key !=
(select first 1 b.rdb$db_key from t b where a.id=b.id);
delete from t a where a.rdb$db_key !=
(select first 1 b.rdb$db_key from t b where a.id=b.id);
Regards
PAscal