Structured Query Language (SQL) – Hoorcollege 1
SELECT
SELECT * (alle kolommen)
FROM les
SELECT docent, klas
FROM les
SELECT *
FROM les
WHERE module = ‘ICT.P.DBO’ (voorwaarde)
, SELECT *
FROM les
ORDER BY module DESC(z tot a), docent ASC (a tot z en mag je weglaten)
Samenvatting
SELECT = beperkt het aantal kolommen in het resultaat
FROM = van welke tabel
WHERE = beperkt het aantal kolommen in het resultaat
ORDER BY = beperkt het aantal kolommen in het resultaat
INSERT
Paul met docentcode VNP01 gaat SQL geven (ICT.P.SQL) aan klas ICTM1c.
INSERT INTO les
VALUES (‘ICT.P.SQL’, ‘VNP01’, ‘ICTM1c’)
SELECT
SELECT * (alle kolommen)
FROM les
SELECT docent, klas
FROM les
SELECT *
FROM les
WHERE module = ‘ICT.P.DBO’ (voorwaarde)
, SELECT *
FROM les
ORDER BY module DESC(z tot a), docent ASC (a tot z en mag je weglaten)
Samenvatting
SELECT = beperkt het aantal kolommen in het resultaat
FROM = van welke tabel
WHERE = beperkt het aantal kolommen in het resultaat
ORDER BY = beperkt het aantal kolommen in het resultaat
INSERT
Paul met docentcode VNP01 gaat SQL geven (ICT.P.SQL) aan klas ICTM1c.
INSERT INTO les
VALUES (‘ICT.P.SQL’, ‘VNP01’, ‘ICTM1c’)