Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
POTEL Nicolas
LePainPerdu
Commits
4ecacbd1
Commit
4ecacbd1
authored
6 years ago
by
POTEL Nicolas
Browse files
Options
Download
Email Patches
Plain Diff
Téléverser un nouveau fichier
parent
365eb19e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
BD.txt
BD.txt
+48
-0
No files found.
BD.txt
0 → 100644
View file @
4ecacbd1
INSERT INTO Client VALUES (20,riri,null);
UPDATE Client SET solde = solde + 10.0 ;
------------------------------------------------------------------------------------------------------------------------
DELETE FROM Client WHERE id = 4 ;
------------------------------------------------------------------------------------------------------------------------
DROP TABLE Client ;
------------------------------------------------------------------------------------------------------------------------
UNIQUER (nopers, noposte, noservice),
CONSTRAINT const_tempo CHECK(finservice > debservice)
------------------------------------------------------------------------------------------------------------------------
ALTER TABLE POSTE ADD (obsolete VARCHAR2(1) DEFAULT 'F' NOT NULL CHECK (obsolete = 'F' OR obsolete = 'V'));
------------------------------------------------------------------------------------------------------------------------
DROP TABLE affectation CASCADE CONSTRAINTS;
------------------------------------------------------------------------------------------------------------------------
CREATE VIEW salaries_southlake(no_salarie, nom, prenom, no_poste, nom_service, anciennete)
AS SELECT employee_id, last_name, first_name, job_id, department_name, FLOOR(MONTHS_BETWEEN(current_date, hire_date))
FROM hr.employees e, hr.departments d, hr.locations l
WHERE d.location_id = l.location_id
AND e.department_id = d.department_id
AND l.city = 'Southlake';
------------------------------------------------------------------------------------------------------------------------
CREATE OR REPLACE FUNCTION charges(salaire IN FLOAT)
RETURN FLOAT
AS
BEGIN
RETURN salaire*0.45;
END;
SELECT employee_id, charges(salary)
FROM hr.employees;
------------------------------------------------------------------------------------------------------------------------
CREATE OR REPLACE PROCEDURE creerLoc(rue LOCALISATION.rue%TYPE DEFAULT 'Inconnu', ville LOCALISATION.ville%TYPE DEFAULT 'Paris')
AS
maxloc NUMBER;
BEGIN
SELECT MAX(noloc) INTO maxloc
FROM localisation;
INSERT INTO localisation(noloc, rue, ville) VALUES (maxloc+1, rue, ville);
COMMIT;
END;
------------------------------------------------------------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
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