title: I'm trying to make a stored procedure to verify a input integer
body: <p>I'm trying to make a stored procedure to verify  a input INT  have maxim 15 digits and the first digit is not 0.</p>
  
  <p>And now I have this:</p>
  
  <pre><code>CREATE PROCEDURE usp_verify_phone_numbers (@phone_number INT)
  AS
     IF @phone_number &gt; 15
     BEGIN
          PRINT 'Not ok'
     END
     ELSE PRINT 'OK'
  
     DECLARE @fld_id INT
  
     SET @fld_id = (SELECT LEFT(@phone_number, 1)
  
     DECLARE @result CHAR(25)
  
     SET @result = CASE 
                     WHEN @fld_id  &gt; 0 
                       THEN 'OK'
                     ELSE 'Not OK'
  END
  
  PRINT @result
  </code></pre>
  
  <p>How can I put  together to verify this conditions?</p>