Home »
MCQs »
MariaDB MCQs
Which is the correct MariaDB query to get the list of products that starts with 'Sh'?
37. Which is the correct MariaDB query to get the list of products that starts with 'Sh'?
- SELECT product_name FROM products WHERE product_name REGEXP 'pr__';
- SELECT product_name FROM products WHERE product_name REGEXP '^pr';
- SELECT product_name FROM products WHERE product_name REGEXP '*pr*';
- SELECT product_name FROM products WHERE product_name REGEXP 'pr';
Answer: B) SELECT product_name FROM products WHERE product_name REGEXP '^pr';
Explanation:
The correct MariaDB query to get the list of products that starts with 'Sh' is:
Syntax:
SELECT product_name FROM products WHERE product_name REGEXP '^pr';