W3. SQL Select Flashcards

1
Q

Q: What does the SQL SELECT statement do?

A

A: It selects data from a database.

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

Q: Write a SELECT statement to return CustomerName and City from the Customers table.

A

SELECT CustomerName, City FROM Customers;

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

Q: What is the syntax for a basic SELECT statement?

A

SELECT column1, column2, …
FROM table_name;

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

Q: In the SELECT statement, what does table_name represent?

A

A: It represents the name of the table from which data is being selected.

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

Q: How do you select all columns from a table without listing each column name?

A

A: Use SELECT *.

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

Q: Write a query to select all columns from the Customers table.

A

SELECT * FROM Customers;

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