Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_mszczonow_1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
alx_mszczonow_1
Commits
8ea81fb9
Commit
8ea81fb9
authored
Jul 24, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autoincrement
parent
1f97f7cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
2-hr-create-dodatki.sql
sql/hr-postgresql/2-hr-create-dodatki.sql
+3
-0
9-hr-drop.sql
sql/hr-postgresql/9-hr-drop.sql
+5
-6
No files found.
sql/hr-postgresql/2-hr-create-dodatki.sql
View file @
8ea81fb9
...
...
@@ -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
...
...
sql/hr-postgresql/9-hr-drop.sql
View file @
8ea81fb9
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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment