Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to display only one record from a table where there are duplicate records ?

Christian Pitet 2Dec 29 2025 — edited Dec 29 2025

Hi,

Under Oracle APEX I am devlopping an application where a report display records from a table. It is normal, expected behaviour. This is the DDL of the table:

 CREATE TABLE "AD_CRISE_SMS" 
  (    "ID" NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE  NOKEEP  NOSCALE  NOT NULL ENABLE, 
    "ID_CRISE" NUMBER, 
    "TEXTE_SMS" VARCHAR2(2048 CHAR), 
    "ENVOYE_LE" DATE, 
    "CREE_PAR" VARCHAR2(256 CHAR), 
    "RETOUR_API" VARCHAR2(255), 
    "NOMBRE_DE_SMS_ENVOYE" VARCHAR2(256), 
    "STATUT_ENVOI" VARCHAR2(4096), 
    "HISTORIQUE_SMS" VARCHAR2(4096), 
     CONSTRAINT "AD_CRISE_SMS_PK" PRIMARY KEY ("ID")
 USING INDEX  ENABLE
  ) ;

I would like to select only one of the duplicate records whatever duplicate it is, to display in my report. This is the kind of values that are in the table:

I am sorry I cannot display a list of insert intructions in the table because I have not SQL developer, I am on the Always Free service from Oracle. And when I tried to generate inserts from an Excel table from freee web tools on the web, the inserts records are badly generated. If you kow one who works I'll be happy to use.

Perhaps this is could be done using rowid of the records ?

Best regards.

This post has been answered by F.Eicken on Dec 30 2025
Jump to Answer
Comments
Post Details
Added on Dec 29 2025
6 comments
160 views