RE: Re[4]: [SQL] Query to eliminate duplicates
От | Mario Filipe |
---|---|
Тема | RE: Re[4]: [SQL] Query to eliminate duplicates |
Дата | |
Msg-id | XFMail.981204154224.mjnf@uevora.pt обсуждение исходный текст |
Ответ на | Re[4]: [SQL] Query to eliminate duplicates (Sferacarta Software <sferac@bo.nettuno.it>) |
Список | pgsql-sql |
> select * from cursos; > numero_aluno|codigo_disciplina|ano_lectivo|epoca|semestre > ------------+-----------------+-----------+-----+-------- > 13427| 35|1998/1999 | 1|t > 13427| 904|1998/1999 | 1|f > 13427| 122|1998/1999 | 1|t > 13427| 907|1998/1999 | 1|f > 13427| 481|1998/1999 | 1|f > 13427| 286|1998/1999 | 1|t > 13427| 368|1998/1999 | 1|t > 13427| 35|1998/1999 | 1|t > 13427| 904|1998/1999 | 1|f > 13427| 122|1998/1999 | 1|t > (10 rows) > > create table temp as select distinct * from cursos; > SELECT > select * from temp; > numero_aluno|codigo_disciplina|ano_lectivo|epoca|semestre > ------------+-----------------+-----------+-----+-------- > 13427| 35|1998/1999 | 1|t > 13427| 122|1998/1999 | 1|t > 13427| 286|1998/1999 | 1|t > 13427| 368|1998/1999 | 1|t > 13427| 481|1998/1999 | 1|f > 13427| 904|1998/1999 | 1|f > 13427| 907|1998/1999 | 1|f > (7 rows) > > DROP TABLE cursos; > DROP > alter table temp rename to cursos; > RENAME Thanks! I had thought about this a while ago... but then I forgott it! Mario Filipe mjnf@uevora.pt http://neptuno.sc.uevora.pt/~mjnf (modificada em 26/11/98)
Вложения
В списке pgsql-sql по дате отправления: