Skip to main content Skip to complementary content

Create the Oracle table and sequence

Procedure

  1. Create an Oracle table called PERSON with four fields: ID, NAME, AGE and COUNTRY, as follows.
    CREATE TABLE TABLE_PERSON 
    (
      ID NUMBER(4) NOT NULL 
    , NAME VARCHAR2(25) 
    , AGE NUMBER(5) 
    , COUNTRY VARCHAR2(20) 
    , CONSTRAINT PERSON_PK PRIMARY KEY 
      (
        ID 
      )
      ENABLE 
    );
  2. Create an Oracle sequence called sequence_demo.
    CREATE SEQUENCE SEQUENCE_DEMO 
    INCREMENT BY 1 
    START WITH 1 
    NOMAXVALUE
    NOCYCLE
    NOCACHE;

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!