Select Command Flashcards
What is the purpose of the SELECT command in MySQL?
To retrieve data from one or more tables within a database
What is the basic syntax for the SELECT command?
SELECT column1, column2 FROM table_name;
How do you retrieve all columns from a table in MySQL?
SELECT * FROM table_name;
What command would you use to fetch specific columns from the ‘student’ table?
SELECT roll_number, first_name FROM student;
What is the significance of the asterisk (*) in a SELECT command?
It fetches every column available in the specified table
What is an example of a SELECT command to retrieve all columns from the ‘student’ table?
SELECT * FROM student;
Which columns are fetched by the command SELECT emp_code, f_name, l_name FROM employee;
?
- emp_code
- f_name
- l_name
True or False: The SELECT command can only retrieve data from one table.
False
What allows users to specify which fields and records to fetch in a SELECT statement?
Fill in the blank: The SELECT command is a powerful tool in MySQL for _______.
[extracting specific data from a database]
What is required to fetch data from specific rows in a SELECT statement?
Conditions