Lesson 2: March 12, 2024 Flashcards

Reviewer

1
Q

DML

A

Data Manipulation Language

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

DQL

A

Data Query Language

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

DDL

A

Data Definition Language

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

Command for viewing

A

SELECT * FROM tableName;

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

Command for viewing specific columns

A

SELECT colName1, colName2, colName3 FROM tableName;

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

Command for viewing specific row

A

SELECT * FROM tableName WHERE colName=’condition’;

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

Command for viewing values that are unique

A

SELECT DISTINCT colName FROM tableName;

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

SQL Arithmetic Operators

A

*
/
%
^ (exponent)

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

Select command with alias

A

SELECT colname1, colname1+colname 2 aliasName FROM tableName;

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

SQL Comparison Operators

A

=
>
<
>=
<=
<> (not equal)

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

SQL Logical Operators

A

AND - both true
(WHERE City=’London’ AND ‘Paris’);

BETWEEN - within the range
(WHERE Price BETWEEN 50 AND 60, includes 50 and 60)

EXISTS (WHERE EXISTS Condition)

IN
(WHERE City IN(‘Paris’, ‘London’);

LIKE
(WHERE City LIKE ‘s%’)

NOT LIKE ‘’

OR
(same syntax with and)

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

‘a%’

A

starting with a

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

‘%a’

A

ending with a

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

‘%a%’

A

contains a

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

‘V%a%’

A

Starts with V and contains a

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