Sequences

From rbachwiki
Revision as of 17:31, 14 November 2017 by Bacchas (talk | contribs) (Created page with "A sequence is an object in oracle that is used to generate a number sequence. this can be useful when you need to create a unique number to act as a primary key. CREATE SEQUE...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A sequence is an object in oracle that is used to generate a number sequence. this can be useful when you need to create a unique number to act as a primary key.

CREATE SEQUENCE customer_sequence
  MINVALUE 1
  MAXVALUE 9999
  START WITH 1
  INCREMENT BY 1
   CACHE 10;
SELECT customer_sequence.NEXTVAL from dual;
SELECT customer_sequence.CURRVAL from dual;


Back To Top- Home - Category