RE: about sequence

From: Bobak, Mark <Mark.Bobak_at_proquest.com>
Date: Wed, 20 May 2009 02:19:36 -0400
Message-ID: <6AFC12B9BFCDEA45B7274C534738067F164410C6_at_AAPQMAILBX02V.proque.st>



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_at_freelists.org [oracle-l-bounce_at_freelists.org] On Behalf Of Mohammed Mehraj hussain [mhdmehraj_at_gmail.com] Sent: Wednesday, May 20, 2009 2:08
To: oracle-l_at_freelists.org
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 Received on Wed May 20 2009 - 01:19:36 CDT

Original text of this message