Search code examples
sqloracle-databasedatabase-sequence

Oracle - does a column have a sequence attached to it?


Kind of a general question here but is there an easy way to determine, in Oracle database, if a field has a sequence number attached to it? This seems like it should be obvious, but I'm missing it.

Thanks.


Solution

  • there is no way to attach a sequence to a field in oracle, what you can do is to use the sequence in your application as you see fit.

    General you'll need to look for triggers on the table, and for procedures that maybe used to insert data to this table, some people use those to regulate sequence use and to sort of attach it to a field but it's not a real attachment but they are just using the sequence and it could be used in many other ways.