100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Samenvatting SQL

Rating
4.3
(3)
Sold
17
Pages
7
Uploaded on
25-05-2016
Written in
2015/2016

Samenvatting van het vak SQL voor HBO-ICT

Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Study
Course

Document information

Uploaded on
May 25, 2016
Number of pages
7
Written in
2015/2016
Type
Summary

Subjects

Content preview

Samenvatting SQL


SELECT
SELECT is iets weergeven. SELECT beperkt het aantal kolommen in een resultaat.
Alles (*) selecteren: Kolommen selecteren: Rijen selecteren


SELECT * SELECT kolom1, kolom2 SELECT kolom1, kolom2,
FROM tabel FROM tabel FROM tabel
WHERE kolom1 = ‘waarde’



ORDER BY
ORDER BY sorteert het eindresultaat van je query.
Aflopend Oplopend


SELECT * SELECT *
FROM tabel FROM tabel
ORDER BY kolom DESC ORDER BY kolom ASC



INSERT
INSERT INTO bepaalt welke tabel gevuld gaat worden, dit moet precies één tabel zijn
Met VALUES geef je aan welke gegevens toegevoegd moeten worden


Voorbeeld:
Paul met docentcode VNP01 gaat SQL geven (ICT.P.SQL) aan klas ICTM1c


INSERT INTO les
VALUES (‘ICT.P.SQL’, ‘VNP01’, ‘ICTM1c’)

, Het kan zijn van het nog niet bekend is aan welke klas Paul les gaat geven, dus:
Optie 1: Optie 2:


INSERT INTO les INSERT INTO les (module, docent)
VALUES (‘ICT.P.SQL’, ‘VNP01’, NULL) VALUES (‘ICT.P.SQL’, ‘VNP01’)


Hier geef je geen waarde, dus NULL. Hier beperk je de kolommen wie je gaat
NULL = niks, geen waarde. (GEEN 0) invullen.



UPDATE
Met UPDATE geef je aan welke tabel gewijzigd gaat worden, dit moet precies één tabel zijn
Met SET geef je de nieuwe waarde aan voor een bepaalde kolom
WHERE beperkt het aantal rijen die gewijzigd moeten worden
Voorbeeld:
Paul met docentcode VNP01 gaat SQL geven (ICT.P.SQL) aan klas ICTM1h in plaats van
ICTM1c


UPDATE les
SET klas = ‘ICTM1h’
WHERE docent = ‘VNP01’




DELETE
Met DELETE FROM geef je aan in welke tabel je gegevens gaat verwijderen. Dit moet precies
één tabel zijn.
WHERE beperkt het aantal rijen die verwijderd moeten worden.
Voorbeeld:
Alle lessen van klas ICTM1h moeten worden verwijderd.


DELETE FROM les
WHERE klas = ‘ICTM1h’
$4.19
Get access to the full document:
Purchased by 17 students

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Reviews from verified buyers

Showing all 3 reviews
4 year ago

7 year ago

Handy summary

7 year ago

4.3

3 reviews

5
1
4
2
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
PieterBrands Hogeschool Windesheim
Follow You need to be logged in order to follow users or courses
Sold
112
Member since
10 year
Number of followers
84
Documents
1
Last sold
1 year ago

3.3

23 reviews

5
3
4
7
3
8
2
4
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions