Commit 8ea81fb9 by Patryk Czarnik

Autoincrement

parent 1f97f7cd
......@@ -151,10 +151,13 @@ column of the departments table';
CREATE SEQUENCE locations_seq START WITH 3300 INCREMENT BY 100 MAXVALUE 9900 NO CYCLE;
ALTER TABLE locations ALTER COLUMN location_id SET DEFAULT nextval('locations_seq');
CREATE SEQUENCE departments_seq START WITH 280 INCREMENT BY 10 MAXVALUE 9990 NO CYCLE;
ALTER TABLE departments ALTER COLUMN department_id SET DEFAULT nextval('departments_seq');
CREATE SEQUENCE employees_seq START WITH 207 INCREMENT BY 1 NO CYCLE;
ALTER TABLE employees ALTER COLUMN employee_id SET DEFAULT nextval('employees_seq');
CREATE OR REPLACE VIEW emp_details_view (
employee_id, job_id, manager_id, department_id, location_id, country_id, first_name, last_name, salary, commission_pct, department_name, job_title, city, state_province, country_name, region_name
......
DROP FUNCTION zarabiajacy_wiecej_niz;
DROP FUNCTION statystyki_departamentu;
DROP FUNCTION nazwisko_szefa;
DROP FUNCTION przenies_pracownika;
DROP PROCEDURE przenies_pracownika;
DROP FUNCTION pensje_dzisiaj;
DROP INDEX emp_name_ix;
DROP INDEX emp_manager_ix;
DROP INDEX emp_job_ix;
......@@ -13,10 +12,6 @@ DROP INDEX emp_department_ix;
DROP VIEW emp_details_view;
DROP VIEW szczegoly_pracownika;
DROP SEQUENCE employees_seq;
DROP SEQUENCE departments_seq;
DROP SEQUENCE locations_seq;
DROP TABLE job_history;
DROP TABLE employees;
DROP TABLE jobs;
......@@ -24,3 +19,7 @@ DROP TABLE departments;
DROP TABLE locations;
DROP TABLE countries;
DROP TABLE regions;
DROP SEQUENCE employees_seq;
DROP SEQUENCE departments_seq;
DROP SEQUENCE locations_seq;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment