Thankz!!!
John Peterson, September 15, 2006 - 2:24 pm UTC
This is what i was looking,thankz
why
scott leblanc, September 16, 2006 - 12:26 am UTC
I'm curious to know - why it is necessary to keep the table and the sequence separate objects.
We often are left scratching our heads wondering whether the CONTACT_ID_SEQ sequence populates AGREEMENT.CONTACT_ID or INVOICE_H.CONTACT_ID. Ultimately our issue is poor naming conventions or inconsistent methods to populate the table.
.I cannot think of a reason to keep table and sequence objects separate.
September 16, 2006 - 2:38 pm UTC
because it could populate BOTH.
In Oracle, with sequences, they are general purpose surrogate key generators. They have never been associated to or limited to a single column.
BA, November 03, 2012 - 3:30 pm UTC
how about option to set sequence.nextval as column default?
November 05, 2012 - 8:40 am UTC
wait just a little bit of time... coming soon to a theater near you !
Another way
Ali, July 31, 2015 - 9:41 pm UTC
select t.table_name, d.referenced_name as sequence_name, d.REFERENCED_OWNER as "OWNER",c.COLUMN_NAME
from user_trigger_cols t , user_dependencies d, user_tab_cols c
where d.name = t.trigger_name
and t.TABLE_NAME = c.TABLE_NAME
and t.COLUMN_NAME = c.COLUMN_NAME
and d.referenced_type = 'SEQUENCE'
and d.type = 'TRIGGER'