Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie question -- auto counter
Oracle provides a 'sequence' object which needs to be linked to a table
column through a trigger to provide such a functionality. A little more
work
then MS Access or SQL Server.
Fortunately my freeware SQLPlusPlus allows you to generate all this code
with a single command in SQLPlusPlus. Following is an example of
generating
dept ids for SCOTT.DEPT table.
SQL> exec S2.BLDSEQ('seq_deptno','ORACLE','dept', 'deptno')
| ----------------------------------------------------------------------
SQLPP even allows you to simulate a sequence using a database table.
SQL> exec s2.bldseq('seq_deptno','TABLE','dept','deptno')
| ----------------------------------------------------------------------
regards,
M. Armaghan Saqib
+---------------------------------------------------------------| 2. SQL Link for XL => Integrate Oracle with XL
| 1. SQL PlusPlus => Add power to SQL Plus command line
+---------------------------------------------------------------
+---------------------------------------------------------------
Young Lee <young.lee_at_supplysolution.com> wrote in message news:38C856E2.249DA02E_at_supplysolution.com...
> > In SQL Server a column can be created with an identity property. > Whenever a new record gets inserted, the field is automatically > incremented by a defined value like incremented by 1 or whatever. > > Is there any equivalent thing in Oracle? > > Thank you, > Young
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 09 2000 - 21:06:13 CST
![]() |
![]() |