Home »
MCQs »
MariaDB MCQs
Which of the following is the correct query to delete a password for a user named 'alex'?
21. Which of the following is the correct query to delete a password for a user named 'alex'?
- SET PASSWORD FOR 'alex'@localhost = PASSWORD("");
- SET PASSWORD FOR 'alex'@localhost = null;
- DEL PASSWORD FOR 'alex'@localhost;
- SET PASSWORD FOR 'alex'@localhost = PASSWORD("null");
Answer: A) SET PASSWORD FOR 'alex'@localhost = PASSWORD("");
Explanation:
The correct query to delete a password for a user named 'alex' is:
Syntax:
SET PASSWORD FOR 'alex'@localhost = PASSWORD("");