title: MySql Constraint to have particular fields value greater than zero
body: <p>I have the following MySql syntax to create a table with constraint to check P_Id column have value greater than zero, but it still allows me to add values less than 0 like -1,-2, etc.</p>
  
  <pre><code>CREATE TABLE Persons(
      P_Id int NOT NULL ,
      LastName varchar( 255 ) NOT NULL ,
      FirstName varchar( 255 ) ,
      Address varchar( 255 ) ,
      City varchar( 255 ) ,
      CHECK (
          P_Id &gt;0
      )
  )
  </code></pre>
  
  <p>Is there anything that i am doing  wrong in above structure to have value for P_Id > 0 ??</p>