Wednesday, February 8, 2012

Creating Sequence

A sequence is a variable that can be used to generate unique value everytime


Creating Sequence
CREATE SEQUENCE EMPID_SEQ
 MINVALUE 1
 START WITH 1
 INCREMENT BY 1
 NOCACHE

Calling Sequence
 SELECT EMPID_SEQ.NEXTVAL FROM DUAL;



Dropping Sequence
DROP SEQUENCE EMPID_SEQ

No comments:

Post a Comment