home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / oracle / 2938 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.5 KB

  1. Path: sparky!uunet!hayes!fgreene
  2. From: fgreene@hayes.com
  3. Newsgroups: comp.databases.oracle
  4. Subject: Re: Q: Duplicate records
  5. Message-ID: <6679.2b638c83@hayes.com>
  6. Date: 25 Jan 93 06:45:23 EDT
  7. References: <1993Jan23.124513.26942@kaija.spb.su>
  8. Organization: Hayes Microcomputer Products, Norcross, GA
  9. Lines: 25
  10.  
  11. In article <1993Jan23.124513.26942@kaija.spb.su>, adn@kaija.spb.su (ADN communication group) writes:
  12. > Does anyone know how to remove duplicated records from existing
  13. > Oracle table? Records may not be duplicated in all fields.
  14. > --
  15. > Nick Maximov
  16. > St. Petersburg, Russia
  17.  
  18. CREATE TABLE TEMPORARY AS
  19. SELECT DISTINCT * FROM YOUR_TABLE;
  20.  
  21. DROP TABLE YOUR_TABLE;
  22.  
  23. RENAME TEMPORARY TO YOUR_TABLE;
  24.  
  25.  ----------------------------------------------------------------------------
  26.  |      Frank Greene                  |          //////  //////             |
  27.  |      DELPHI SYSTEMS, Inc.          |           ////    ////              |
  28.  |      Telephone [615] 458-6032      |          ////    ////  //////       |
  29.  |      Compuserve 74200,427          |         ////    ////    ////        |
  30.  |      324 Ootsima Way               |        ////    ////    ////         |
  31.  |      Loudon, TN 37774              |       //////  //////  //////        |
  32.  ----------------------------------------------------------------------------
  33.  |         Of course, any opinions or suggestions are strictly my own       |
  34.  ----------------------------------------------------------------------------
  35.  
  36.