W3. SQL Operators Flashcards

1
Q

Q: List the basic SQL arithmetic operators.

A

A: + (Add), - (Subtract), * (Multiply), / (Divide), % (Modulo)

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

Q: What does the % (Modulo) arithmetic operator do in SQL?

A

A: It returns the remainder after dividing two numbers.

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

Q: List some SQL bitwise operators.

A

A: & (Bitwise AND), | (Bitwise OR), ^ (Bitwise exclusive OR)

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

Q: What is the function of the & (Bitwise AND) operator?

A

A: It performs a bitwise AND operation between two values.

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

Q: List the main SQL comparison operators.

A

A: = (Equal to), > (Greater than), < (Less than), >= (Greater than or equal to), <= (Less than or equal to), <> (Not equal to)

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

Q: What does the <> operator do in SQL?

A

A: It checks if two values are not equal to each other.

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

Q: List some SQL compound operators.

A

A: +=, -=, *=, /=, %= (arithmetic compound operators), &=, ^=, |= (bitwise compound operators)

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

Q: What does the += compound operator do?

A

A: It adds a specified value to the original value and updates the original value.

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

Q: List the SQL logical operators.

A

ALL, AND, ANY, BETWEEN, EXISTS, IN, LIKE, NOT, OR, SOME

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

Q: What does the AND logical operator do?

A

A: It returns TRUE if all conditions separated by AND are TRUE.

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

Q: Describe the EXISTS logical operator.

A

A: It returns TRUE if the subquery returns one or more records.

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

Q: How does the BETWEEN logical operator work?

A

A: It returns TRUE if a value is within a specified range.

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

Q: What does the LIKE logical operator do?

A

A: It returns TRUE if a value matches a specified pattern.

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

Q: How does the OR logical operator work in SQL?

A

A: It returns TRUE if any of the conditions separated by OR is TRUE.

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