удаление дубликатов
Добавлено: 12 июн 2003, 08:31
приехала таблица вида
create table lith( station int not null, from double not null, to double not null )
и надо бы все три поля сделать primary
insert into lith (station, from, to) values (1, 0, 5)
insert into lith (station, from, to) values (1, 5, 10)
insert into lith (station, from, to) values (1, 5, 10)
insert into lith (station, from, to) values (1, 10, 15)
как бы удалить 1,5,10 лишнее ?
понятно что сначала надо бы добавить в табличку
alter table lith add super_id int identity(1,1)
а дальше куда рыть ? с тремя-то полями ?
create table lith( station int not null, from double not null, to double not null )
и надо бы все три поля сделать primary
insert into lith (station, from, to) values (1, 0, 5)
insert into lith (station, from, to) values (1, 5, 10)
insert into lith (station, from, to) values (1, 5, 10)
insert into lith (station, from, to) values (1, 10, 15)
как бы удалить 1,5,10 лишнее ?
понятно что сначала надо бы добавить в табличку
alter table lith add super_id int identity(1,1)
а дальше куда рыть ? с тремя-то полями ?