SQL Flashcards

1
Q

What does ORDER BY do?

A

Sorts the result-set in ascending or descending order.

Ascending by default, descending by use of DESC

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

What does SELECT do?

A

Selects data from a database, storing it in a table called the ‘result-set’

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

What does SELECT DISTINCT do?

A

Selects and returns only different values

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

What does WHERE do?

A

Extracts data that meets a given condition

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

What does AND do?

A

Displays a record if all conditions are met

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

What does OR do?

A

Displays a record if one of the conditions is met

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

What does NOT do?

A

Displays a record if the conditions are not true

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

What does INSERT INTO do?

A

Inserts new records into a table

INSERT INTO table_name VALUES (value1, value2,…

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

What is a NULL value?

A

A field with no value

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