Select Command Flashcards

1
Q

What is the purpose of the SELECT command in MySQL?

A

To retrieve data from one or more tables within a database

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

What is the basic syntax for the SELECT command?

A

SELECT column1, column2 FROM table_name;

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

How do you retrieve all columns from a table in MySQL?

A

SELECT * FROM table_name;

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

What command would you use to fetch specific columns from the ‘student’ table?

A

SELECT roll_number, first_name FROM student;

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

What is the significance of the asterisk (*) in a SELECT command?

A

It fetches every column available in the specified table

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

What is an example of a SELECT command to retrieve all columns from the ‘student’ table?

A

SELECT * FROM student;

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

Which columns are fetched by the command SELECT emp_code, f_name, l_name FROM employee;?

A
  • emp_code
  • f_name
  • l_name
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False: The SELECT command can only retrieve data from one table.

A

False

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

What allows users to specify which fields and records to fetch in a SELECT statement?

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

Fill in the blank: The SELECT command is a powerful tool in MySQL for _______.

A

[extracting specific data from a database]

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

What is required to fetch data from specific rows in a SELECT statement?

A

Conditions

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