title: Writing script creates and calls a stored procedure
body: <p>Write a script that creates and calls a stored procedure named test. This stored procedure should
  declare a variable and set it to the count of all products in the Products table. If the count is greater
  than or equal to 7, the stored procedure should display a message that says, “The number of products
  is greater than or equal to 7”. Otherwise, it should say, “The number of products is less than 7”.</p>
  
  <pre><code>DROP PROCEDURE IF EXISTS test;
  CREATE  procedure test()
  BEGIN
  DECLARE count_of_7 DECIMAL(10,2);
  
  SELECT  count(product_id) 
  into count_of_7
  
  FROM products;
  IF count_of_7 &gt;= 7 THEN
  
  SELECT 'The number of products is greater than or equal to 7' AS message;
  ELSE
  
  SELECT 'The number of products is less than 7' AS message;
  end if;
  call test();
  </code></pre>
  
  <p>21:38:55    CREATE  procedure test() BEGIN DECLARE count_of_7 DECIMAL(10,2) Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3    0.016 sec</p>