Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to create unique primary index (autoinc feature)?

Re: How to create unique primary index (autoinc feature)?

From: M. Armaghan Saqib <armaghan_at_yahoo.com>
Date: Tue, 25 Jan 2000 05:45:54 GMT
Message-ID: <86jdah$nro$1@nnrp1.deja.com>


Hi, Mr. Sybrand Bakker

  1. How many posts do you see on this newsgroup (including your own) which explain the concept of (say) triggers, sequences, constraints, primary/foreign keys etc during repplies?

You are right but we can't write a article or a book during a newsgroup post.

New Knowlege Base infra-structure in my SQLPlusPlus is exactly for this same reason. This will contain comprehensive details about such things.

2. If I do miss something, please correct me instead of just criticism. I am not perfect and no one can be. Your post only crizied (it only hurts) and did not include any thing which could help.

3. I have great respect for all the people (including you) who respond here. I have learned a lot here from all of them and try to contribute something of mine.

4. With over 5000 users of my freeware SQL PlusPlus and hundreds of "thankyou" emails I have received till todate, I think I do have done some little contribution to this newsgroup.

5. I assume you have not developed something in a product shape so you don't know how much pain it is to develop something and then convert it into a product (user manual, installation, web distribution,easy of use, free support etc). THEN MAKING IT AVAILABLE FOR ABSOLUTE FREE INCLUDING TIME-CONSUMING PERSONAL SUPPORT. 6. Yes I get visitors to my WEB SITE and if I get business from this marketing there is nothing wrong. Why HOTMAIL is free. Whey YAHOO is free?. But consider the following things: a) I have not made a single penny from any thing on my web page till todate. I am already too heavily loaded from work and can't take more. b) There is no demo/trial version of my main product: Munshi8 Enterprise. I simply have no time to convert it in a product shape.

regards,
M. Armaghan Saqib


In article <948536571.3085.0.pluto.d4ee154e_at_news.demon.nl>,   "Sybrand Bakker" <postmaster_at_sybrandb.nospam.demon.nl> wrote:
> Will this help?
> Your reply doesn't explain the sequence concept,
> Your code is missing a grant and a synonym, your code doesn't make
> provisions in case someone filled the deptno column (which is very
unlikely,
> but IMO you need to protect the trigger against it)
>
> Basically, you only reply to promote your own software and to attract
people
> to your site, and you do so several times a week.
>
> This begins to become more than annoying, sorry to say so.
>
> Regards,
>
> --
> Sybrand Bakker, Oracle DBA
>
> M. Armaghan Saqib <armaghan_at_yahoo.com> wrote in message
> news:86btnj$inp$1_at_nnrp1.deja.com...
> > Oracle does not support any auto-increment column.
> >
> > You can use my SQL PlusPlus (freeware) to generate the following
> > code to implement auto-in column in the database.
> >
> > Here is an example:
> >
> > SQL> EXEC S2.bldseq('seq_deptno','ORACLE','dept','deptno')
> >
> > | DROP SEQUENCE seq_deptno;
> > | CREATE SEQUENCE seq_deptno
> > | START WITH 1 INCREMENT BY 1
> > | MINVALUE 1 MAXVALUE 999999999999999999999999999
> > | CYCLE CACHE 20 ORDER;
> > |
> > | -- This optional trigger applies sequence values to a table column
> > thus
> > | -- creating an auto-increment column which can be used as primary-
key
> > |
> > | CREATE OR REPLACE TRIGGER trg1_dept
> > | BEFORE INSERT
> > | ON dept
> > | FOR EACH ROW
> > | BEGIN
> > | SELECT seq_deptno.NEXTVAL
> > | INTO :NEW.deptno
> > | FROM DUAL;
> > | END;
> > | /
> >
> > regards,
> > M. Armaghan Saqib
> > +---------------------------------------------------------------
> > | 1. SQL PlusPlus => Add power to SQL Plus command line
> > | 2. SQL Link for XL => Integrate Oracle with XL
> > | 3. Oracle CBT with sample GL Accounting System
> > | Download free: http://www.geocities.com/armaghan/
> > +---------------------------------------------------------------
> >
> > In article <86bq2k$1iog$1_at_dolf.netfront.net>,
> > "Torsetn Trzeciak" <torsten.trzeciak_at_gmx.de> wrote:
> > > Hello,
> > > I use JDBC with Oracle in a multi user environment.
> > > How can I create a unique primary key for inserts.
> > > Is there an autoincrement feature available?
> > >
> > > Thanks in advance
> > > Torsten
> > >
> > > ------
> > > Posted via news://freenews.netfront.net
> > > Complaints to news_at_netfront.net
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>

--


Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Jan 24 2000 - 23:45:54 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US