Hi Everyone -
I'm looking for a SQL statement that I can use to find out if a given
column in a table uses a specific sequence as it's next default value.
Is this possible?
For example, if the table was created with:
CREATE TABLE accounts
(
account_id integer NOT NULL DEFAULT
nextval(('accounts_account_id_seq'::text)::regclass),
account_number character varying(40) NOT NULL
)
Is there a way for me to query the database metadata to verify that
accounts.account_id uses the sequence accounts_account_id_seq as it's
default next value?
Thanks in advance!
Scott.