Basic MySQL Query Questions

Basic MySQL Query Questions

12th Grade

15 Qs

quiz-placeholder

Similar activities

Incentives Overview

Incentives Overview

12th Grade

10 Qs

Interview XII

Interview XII

12th Grade

20 Qs

Fundamental of Relational Database Quiz

Fundamental of Relational Database Quiz

12th Grade

20 Qs

PERSONALITY DEVELOPMENT Freud's Theory Quiz

PERSONALITY DEVELOPMENT Freud's Theory Quiz

12th Grade

14 Qs

Fire Officer p130

Fire Officer p130

12th Grade

15 Qs

Grapevine Fire Department Equipment Policy

Grapevine Fire Department Equipment Policy

12th Grade

12 Qs

Fire Officer p139

Fire Officer p139

12th Grade

15 Qs

Interview Task

Interview Task

12th Grade

10 Qs

Basic MySQL Query Questions

Basic MySQL Query Questions

Assessment

Quiz

Others

12th Grade

Hard

Created by

Alfarisi Grita

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The SQL command to change the position of an employee with id_employee = 4 to 'Supervisor' is:

MODIFY employee SET position = 'Supervisor' WHERE id_employee = 4;

CHANGE employee SET position = 'Supervisor' WHERE id_employee = 4;

UPDATE employee SET position = 'Supervisor' WHERE id_employee = 4;

ALTER employee SET position = 'Supervisor' WHERE id_employee = 4;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to increase the salary of all employees by 10%?

UPDATE employee SET salary = salary + (salary * 0.1);

MODIFY employee SET salary = salary + 10%;

ALTER employee SET salary = salary * 1.1;

CHANGE employee SET salary = salary + 0.1;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The command to update the department to 'HRD' for employees who have a salary greater than 7 million is:

UPDATE employee SET department = 'HRD' WHERE salary > 7000000;

MODIFY employee SET department = 'HRD' WHERE salary > 7000000;

CHANGE employee SET department = 'HRD' WHERE salary > 7000000;

ALTER employee SET department = 'HRD' WHERE salary > 7000000;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The SQL command to delete an employee with id_employee = 3 is:

REMOVE FROM employee WHERE id_employee = 3;

DELETE FROM employee WHERE id_employee = 3;

DROP employee WHERE id_employee = 3;

CLEAR FROM employee WHERE id_employee = 3;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to delete all employees who have a salary less than 4 million?

DELETE FROM employee WHERE salary < 4000000;

REMOVE FROM employee WHERE salary < 4000000;

DROP FROM employee WHERE salary < 4000000;

CLEAR FROM employee WHERE salary < 4000000;

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The SQL command to delete the entire employee table from the database is:

DELETE TABLE employee;

DROP TABLE employee;

REMOVE TABLE employee;

CLEAR TABLE employee;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if we run DROP TABLE employee?

Deletes all data in the table but the table structure remains.

Deletes the entire table along with its structure from the database.

Deletes only some columns from the table.

Deletes a temporary table, but it can be restored with ROLLBACK.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?