W3. SQL Select Flashcards
1
Q
Q: What does the SQL SELECT statement do?
A
A: It selects data from a database.
2
Q
Q: Write a SELECT statement to return CustomerName and City from the Customers table.
A
SELECT CustomerName, City FROM Customers;
3
Q
Q: What is the syntax for a basic SELECT statement?
A
SELECT column1, column2, …
FROM table_name;
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.
5
Q
Q: How do you select all columns from a table without listing each column name?
A
A: Use SELECT *.
6
Q
Q: Write a query to select all columns from the Customers table.
A
SELECT * FROM Customers;