Skip to content

Instantly share code, notes, and snippets.

@dioniciodiaz
Forked from DannyFeliz/job_grades_table.sql
Created January 20, 2019 23:13
Show Gist options
  • Select an option

  • Save dioniciodiaz/286e9edd096301236bc8608839695a22 to your computer and use it in GitHub Desktop.

Select an option

Save dioniciodiaz/286e9edd096301236bc8608839695a22 to your computer and use it in GitHub Desktop.
JOB_GRADES TABLE - ORACLE
CREATE TABLE job_grades (
grade CHAR(1),
lowest_sal NUMBER(8,2) NOT NULL,
highest_sal NUMBER(8,2) NOT NULL
);
ALTER TABLE job_grades
ADD CONSTRAINT jobgrades_grade_pk PRIMARY KEY (grade);
INSERT INTO job_grades VALUES ('A', 1000, 2999);
INSERT INTO job_grades VALUES ('B', 3000, 5999);
INSERT INTO job_grades VALUES ('C', 6000, 9999);
INSERT INTO job_grades VALUES ('D', 10000, 14999);
INSERT INTO job_grades VALUES ('E', 15000, 24999);
INSERT INTO job_grades VALUES ('F', 25000, 40000);
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment