"Students" table schema and data used in various examples on SQLINFO.net site

Students table schema (ddl)

 

CREATE TABLE STUDENTS
     (
        STUDENT_ID                     NUMBER          NOT NULL , 
        PASSWORD                       VARCHAR2(15)        NULL , 
        EMPLOYEE_ID_FK                 VARCHAR2(15)        NULL , 
        CUSTOMER_ID_FK                 VARCHAR2(15)        NULL , 
        ACTIVE_FLG                     NUMBER(4,0)     NOT NULL , 
        LASTNAME                       VARCHAR2(30)        NULL , 
        FIRSTNAME                      VARCHAR2(20)        NULL , 
        MIDDLENAME                     VARCHAR2(20)        NULL , 
        PREFIX_NAME                    VARCHAR2(6)         NULL , 
        SUFFIX_NAME                    VARCHAR2(6)         NULL , 
        GENDER_CODE                    VARCHAR2(1)         NULL , 
        BIRTH_DTTM                     DATE                NULL , 
        BIRTH_CITY_NM                  VARCHAR2(20)        NULL , 
        BIRTH_STATE_CODE               VARCHAR2(2)         NULL , 
        BIRTH_COUNTRY_CODE             VARCHAR2(2)         NULL , 
        GPA                            NUMBER              NULL , 
        IS_ON_STAFF                    NUMBER(4,0)     NOT NULL , 
        SOC_SEC_NUM                    VARCHAR2(9)         NULL , 
        DRIVER_LICENSE_NUM             VARCHAR2(25)        NULL , 
        DRIVER_LICENSE_STATE_CODE      VARCHAR2(2)         NULL , 
        DRIVER_LICENSE_COUNTRY_OCDE    VARCHAR2(2)         NULL , 
        OTHER_ID_NUM                   VARCHAR2(25)        NULL , 
        CITIZEN_COUNTRY_CODE           VARCHAR2(2)         NULL , 
        MARITAL_STATUS_CODE            VARCHAR2(3)         NULL , 
        RACE_CODE                      VARCHAR2(5)         NULL , 
        ETHNIC_GROUP_CODE              VARCHAR2(5)         NULL , 
        VETERAN_MILITARY_STATUS_CODE   VARCHAR2(2)         NULL , 
        FIN_ALERT_CODE                 VARCHAR2(2)         NULL , 
        INACTIVE_DATE                  DATE                NULL , 
        INACTIVE_REASON                VARCHAR2(255)       NULL , 
        EMPLOYEE_INACTIVATING          NUMBER              NULL , 
        CONSTRAINT SYS_C004714 PRIMARY KEY (STUDENT_ID)
     )

NOCACHE
LOGGING
/


CREATE UNIQUE INDEX IX_STUDENTS1
       ON    STUDENTS(PASSWORD) ; 

CREATE UNIQUE INDEX IX_STUDENTS2
       ON    STUDENTS(OTHER_ID_NUM) ; 

CREATE INDEX IX_STUDENTS3
       ON    STUDENTS(DRIVER_LICENSE_NUM) ; 

CREATE INDEX IX_STUDENTS4
       ON    STUDENTS(LASTNAME) ; 

CREATE INDEX IX_STUDENTS5
       ON    STUDENTS(SOC_SEC_NUM) ; 
       
 Collapse All    Expand All
Custom Search

Oracle Information and Resources