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'?

  1. SELECT product_name FROM products WHERE product_name REGEXP 'pr__';
  2. SELECT product_name FROM products WHERE product_name REGEXP '^pr';
  3. SELECT product_name FROM products WHERE product_name REGEXP '*pr*';
  4. 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';

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.