# Finding orphaned sequences

DevFeed: [Finding orphaned sequences](<https://devfeed.tech/articles/finding-orphaned-sequences-34363.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2010/03/finding-orphaned-sequences/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2010-03-17T12:35:00Z

Content type: tutorial

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [Sequences](<https://devfeed.tech/topics/sequences.md>), [Database](<https://devfeed.tech/topics/database.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [query](<https://devfeed.tech/tags/query.md>), [sequences](<https://devfeed.tech/tags/sequences.md>)

## AI overview

The article presents a query for finding database sequences that are not used as default values in any table columns.

## Source excerpt

This time we're having a database where sequences were used, but not systematically as a default value of a given column. It's mainly an historic bad idea, but you know the usual excuse with bad ideas and bad code: the first 6 months it's experimental, after that it's historic. *Not talking about genome orphaned sequences here, though* Still, here's a query for 8.4 that will allow you to list those sequences you have that are not used as a default value in any of your tables: