SQL - Basics Flashcards

The very basics of SQL.

1
Q

What does SQL stand for?

A

Structured Query Language.

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

What is SQL used for?

A

To communicate with databases.

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

Which statement is used to select a column?

A

SELECT.

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

Which statement is used to choose the table?

A

FROM.

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

Which statement is used to filter data?

A

WHERE.

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

What is the basic order of an SQL query?

A

SELECT, FROM, WHERE.

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

How do you select the ‘first_name’ column from a table called ‘customer_name’?

A

SELECT first_name
FROM customer_name;

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

How do you select multiple columns?

A

Separate column names with commas.

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

How do you select ‘customer_id’ and ‘first_name’ from ‘customer_name’?

A

SELECT customer_id, first_name
FROM customer_name;

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

How do you filter results by a condition?

A

Use WHERE.

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

How do you select customers with first_name ‘Tony’?

A

SELECT first_name
FROM customer_name
WHERE first_name = ‘Tony’;

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

How do you add more than one condition in a query?

A

Use AND or OR.

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

How do you filter results where a value is greater than a number?

A

Use > in the WHERE clause.

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

How do you write a comment in SQL?

A

Use -- for single-line comments.

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

Are SQL keywords case-sensitive?

A

No, they are not case-sensitive.

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