Re: help regarding oracle

"Hyne, David" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <[email protected]>
Please use SEQUENCE.  You need to have DBA privilege to create this.

Syntax is:

CREATE SEQUENCE seq_name
    START WITH 1
    INCREMENT BY 1
    NOMINVALUE
    MAXVALUE 1.000E+27
    NOCYCLE
    NOCACHE
    ORDER
/

In your query, you can get next value like this:

SELECT seq_name.NEXTVAL FROM DUAL;

Or if you need this value to be inserted to your data table...

INSERT INTO data_table (column1, column2) VALUES(seq_name.NEXTVAL, "some
value");

David

-----Original Message-----
From: shashi kanth goud [mailto:[email protected]]
Sent: Friday, October 03, 2003 4:39 AM
To: [email protected]
Subject: Re: help regarding oracle


hi everybody,
   iam working on oracle 7 . i want to use auto counter field in oracle can
anyone tell me how to do it????

thanx in advance


Regards
Shashi

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

------------------------------------------------------------------------------

This email is confidential and may be legally privileged.

It is intended solely for the addressee. Access to this email by anyone else,
unless expressly approved by the sender or an authorized addressee, is
unauthorized.

If you are not the intended recipient, any disclosure, copying, distribution
or any action omitted or taken in reliance on it, is prohibited and may be
unlawful. If you believe that you have received this email in error, please
contact the sender, delete this e-mail and destroy all copies.

==============================================================================

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.