|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi !
I'm pretty new to Oracle. I was wondering if there's an equivalent to the row attribute IDENTITY (which increment by imself) in MSSQL Server when you create a table. If yes, could you please give me a small exemple ! Thank you ![]() |
|
#2
|
|||
|
|||
|
Use a sequence.
|
|
#3
|
|||
|
|||
|
more specifically: it goes something like:
create sequence sequence name start with 'enter a number' increment by 'enter a no' eg: create sequence stu_seq start with 1 increment by 1 |
|
#4
|
|||
|
|||
|
Well thank you
Thanks guys !
![]() |
|
#5
|
|||
|
|||
|
But creating the sequence is only half of the story. The column still needs to be filled with the values from that sequence. For that you need to create a trigger which fills the column.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Create table synthax |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|