Following post will Help you to create sequence in oracle
Create SEQUENCE Command
-----------------------------------------
Syntax:
CREATE SEQUENCE SEQUENCE_NAME
MINVALUE [-100 ] //optional [Can be positive or Negative]
MAXVALUE [100] //optional [Can be positive or Negative]
START WITH 0 //optional [Can be positive or Negative]
INCREMT BY 1 //optional [Can be positive or Negative]
-----------------------------------------
create sequence SqEmp
minvalue 1
maxvalue 500
start with 1
increment by 2
Above Image has Create Command for Creating Sequence like [ 1,3,5,7,9....] because we Increment Sequence by "2" so.. Here We define minimum value is 1.
Maximum value is 500 [Here maximum value will be 499].
sequence will no display index value more than 500.
From Above Image you can see that we can create sequence with different style and different parameters.
In a Image[1] we have parameter's start with in which we define
if we Don't assign such parameter it by default take (1) for that parameters.
Create SEQUENCE Command
-----------------------------------------
Syntax:
CREATE SEQUENCE SEQUENCE_NAME
MINVALUE [-100 ] //optional [Can be positive or Negative]
MAXVALUE [100] //optional [Can be positive or Negative]
START WITH 0 //optional [Can be positive or Negative]
INCREMT BY 1 //optional [Can be positive or Negative]
-----------------------------------------
create sequence SqEmp
minvalue 1
maxvalue 500
start with 1
increment by 2
Above Image has Create Command for Creating Sequence like [ 1,3,5,7,9....] because we Increment Sequence by "2" so.. Here We define minimum value is 1.
Maximum value is 500 [Here maximum value will be 499].
sequence will no display index value more than 500.
From Above Image you can see that we can create sequence with different style and different parameters.
In a Image[1] we have parameter's start with in which we define
- start with (1)
- increment by (1)
if we Don't assign such parameter it by default take (1) for that parameters.
No comments:
Post a Comment