Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/11/2017, 03:09
Avatar de AVBorland
AVBorland
 
Fecha de Ingreso: marzo-2016
Ubicación: Moscu
Mensajes: 42
Antigüedad: 8 años
Puntos: 4
Respuesta: Mostras solo un registro que tengan campos duplicados

Hola!

Código SQL:
Ver original
  1. SQL> SELECT * FROM test;
  2.  
  3.  
  4.     CODIGO NOMBRES        ESTADO
  5. ---------- ---------- ----------
  6.        122 pepe                1
  7.        122 pepe                2
  8.        123 jose                2
  9.        124 lucho               1
  10.        124 lucho               2
  11.  
  12. SQL> SELECT codigo FROM (SELECT MIN(rownum), codigo FROM test GROUP BY codigo);
  13.  
  14.     CODIGO
  15. ----------
  16.        123
  17.        124
  18.        122
  19.  
  20. SQL>