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

Summary IEB IT SQL Statements

Rating
4.0
(1)
Sold
1
Pages
5
Uploaded on
26-07-2022
Written in
2019/2020

This document summarizes all the necessary SQL statements and provides basic examples to help you understand. These notes were produced by a Top 1% IEB candidate in Information Technology in 2020.

Institution
Course








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

Written for

Institution
Course
Schooljaar
200

Document information

Uploaded on
July 26, 2022
Number of pages
5
Written in
2019/2020
Type
Summary

Subjects

Content preview

Simple SQL Statements
Displaying selected fields: Note:
SELECT <field>, <field> * means all fields
FROM <table>; [] are used if field is
more than one word
Sorting by a field:
SELECT <field (s)> XXX
FROM <table> ASC – Ascending Order
ORDER BY <field> XXX; *default is ASC DESC – Descending Order
Note: You can order by multiple fields!

Displaying data using conditions: #
SELECT * Can be >, < or =
FROM <table> XXX
WHERE <field> # XXX; = ‘Text’
Or can be a digit

Conditions using AND, OR, NOT, BETWEEN … AND …
WHERE Artist = ‘G-Eazy’ AND Title = ‘Scary Nights’;
WHERE Artist = ‘G-Eazy’ OR Artist = ‘NF’;
WHERE NoOfSongs BETWEEN 10 AND 15;

Inserting a record:
INSERT INTO <table> (<field1>, <field2)
VALUES (<value1>, <value2>);

Deleting a record:
DELETE
FROM <table>
WHERE <condition> [AND/OR <condition>]

Changing the details in a field:
UPDATE <table>
SET <column name> = <new value> [,…]
WHERE <column name> = <existing value>

Using quotes in SQL Statements:
Trying to find a name such as O’Brien with an apostrophe in it.
WHERE <name> = ‘O’‘Brien’;

Calculations with fields:
SELECT SSName, SFName, 2015 – AcYear AS [Completion Year]

Deriving a field: (creating a new field using calculations)
SELECT SSName, SFName, 2015 – AcYear AS [Completion Year]




Nikhar Ramlakhan © Page 1 of 5
$9.16
Get access to the full document:

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 reviews
2 year ago

4.0

1 reviews

5
0
4
1
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.
NikharRamlakhan Trinityhouse High
Follow You need to be logged in order to follow users or courses
Sold
23
Member since
5 year
Number of followers
16
Documents
7
Last sold
1 month ago
Tech Support

An experienced programmer and IT enthusiast with a goal of explaining difficult IT concepts in simpler terms!

3.5

2 reviews

5
0
4
1
3
1
2
0
1
0

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