RE: about sequence

In Oracle, there is no defined relationship between a column and a sequence.

I consider it good practice to name a sequence after the column it's intended 
to populate, but it's not enforced in any way.

For example, I have a table in my database called DOCUMENTS.  The primary key 
for DOCUMENTS is DOC_ID.  The sequence used to populate  DOC_ID is DOC_ID_SQ. 
But that's just my naming convention.  Anyone could populate the DOC_ID using 
any sequence, or not use a sequence at all. Nothing in the database enforces a 
relationship.

Hope that helps,

-Mark
________________________________________
From: oracle-l-bounce@xxxxxxxxxxxxx [oracle-l-bounce@xxxxxxxxxxxxx] On Behalf 
Of Mohammed Mehraj hussain [mhdmehraj@xxxxxxxxx]
Sent: Wednesday, May 20, 2009 2:08
To: oracle-l@xxxxxxxxxxxxx
Subject: about sequence

hi,
I've a EMP table and it uses EMP_SEQ sequence to generate the EMPNO...

I know the above information as i created the sequence ..
But how come the other person knows that so and so sequence is used on
this table EMP..
So that the person knows the max value etc...
--
http://www.freelists.org/webpage/oracle-l




--
http://www.freelists.org/webpage/oracle-l


Other related posts: