下载此文档

oracle删除重复内容Oracle删除重复内容.doc


文档分类:IT计算机 | 页数:约6页 举报非法文档有奖
1/6
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/6 下载此文档
文档列表 文档介绍
oracle删除重复内容(Oracle删除重复内容)
In normal work, you may encounter an attempt to create a unique index on a column or column has a ROWID pseudo column that identifies the unique identity row and provides fast access to a particular row. The maximum (max) or minimum (min) function can be used to determine duplicate rows easily.
1) use the max function to find duplicate rows
SQL>select, columnl, column2, column3, from, table name, a
Where ROWID
2) use the Min function to find duplicate rows
SQL>select, columnl, column2, column3, from, table name, a
Where rowid> (select min (ROWID) from table name
Where columnl=a. columnl and column2=a. column2
And, colum3=a. colum3, and...);
However, when the table is large (for example, more than 500 thousand), the efficiency of this approach is intolerable.
[b]3. [/b][b] lookup duplicate rows by defining integrity constraints [/b]
Define a integrity constraint, integrity constraint is a rule that limits the values of one or more columns in the base table. A unique keyword can be specified by defining the UNIQUE constraint on the table. To satisfy this constraint, the same value cannot be included in the unique keyword column.
Therefore, you can use the EXCEPTIONS INTO clause to store records that violate the activation integrity constraint in a table (EXCEPTIONS), which must be built before using this option. You can get duplicate record

oracle删除重复内容Oracle删除重复内容 来自淘豆网www.taodocs.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数6
  • 收藏数0 收藏
  • 顶次数0
  • 上传人小健
  • 文件大小84 KB
  • 时间2022-05-20