You're here: Snippet Directory » Databases (26)
Language:

Snippet Directory - Databases 

Snippets

Count of Distinct fields in a table

This is goodfor getting a count of the instances of a value in a table. eg. How many Addresses in the table are from each state?

Language: English | Programming Language: SQL | Author: wapu [not registered]

Delete duplicate rows

This will delete duplicate rows in a table. Excellent maintenance script.

Language: English | Programming Language: SQL | Author: haighis [not registered]

Duplikate finden

Das folgende Statement liefert alle Duplikate in einer Tabelle und die Anzahl derer:

Language: Deutsch | Programming Language: SQL | Author: Thomas

Find Duplicates in a field

Returns duplicates for a field.

Language: English | Programming Language: SQL | Author: pjjt [not registered]

Find wholes in letter/number sequences using self-joins

If you have a data dictionary at your work and you want to add a new list of values requiring [for example] 7 elements, then you can either start your elements at the very end of the dictionary [select max(id)+1] or you can use these SQL ...

Language: English | Programming Language: SQL | Author: vic4 [not registered]

move_indexes.sql

Relocates indexes in an Oracle tablespaceto any other tablespace. When run inSQL*Plus the script displays all tablespacesthat contain indexes. The script thenprompts for the source tablespace and thedestination tablespace. When finished ...

Language: English | Programming Language: SQL | Author: buzzwang [not registered]

Output table/row comments (Oracle 8+)

Outputs a description of all tables with a given owner. Will list any comments associated with the selected table/column. This is an Oracle-specific stored-proc.

Language: English | Programming Language: SQL | Author: hwaite [not registered]

Predeccesor and successor detection in different-collation s

Predeccesor and successor detection in different-collation supporting db systems.

Language: English | Programming Language: SQL | Author: vnrg [not registered]

Quick and dirty Oracle export/import

The code creates a script of insert statements for the existing data within a table. The generated script can then be run to re-populate the table.

Language: English | Programming Language: SQL | Author: jujiro [not registered]

Time to UNIX timstamp conversion functions for Oracle

The functions allow the conversion of a date to timestamp and vice-versa in Oracle

Language: English | Programming Language: SQL | Author: vikaas_bv [not registered]
RSS