T7 - SQL Flashcards

1
Q

SQL

A

stands for Structured Query Language
allows you to create, query and add data to databases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

SELECT

A

… (list the fields to be displayed)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

FROM …

A

(specify the table name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

WHERE

A

… (list the search criteria)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

“wild card”

A
  • to mean “all columns”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

WHERE clause

A

is used to select only records satisfying a specified condition:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Operators in where clause:

A

= != > < >= <= AND, OR, NOT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

BETWEEN

A

between an inclusive range

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

LIKE

A

search for a pattern

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Sorting:

A

ORDER BY allows a query to sort data by ascending or descending order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

To sort by ascending order:

A

ORDER BY Surname ASC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

To sort by descending order:

A

ORDER BY Surname DESC

How well did you know this?
1
Not at all
2
3
4
5
Perfectly