title: How to add NOT NULL constraint where the column data type is NON INTEGER (say VARCHAR(50))
body: <p>Trying to add a <code>NOT NULL</code> constraint to an existing table. Succeeded for the first column (<code>EMPID</code>), but failed to add the constraint for the second column (<code>EMPNAME</code>). </p>
  
  <p>This is my query:</p>
  
  <pre><code>CREATE TABLE tbl_primarykeyPOST2
  (  
       EMPID INT,
       EMPNAME VARCHAR(50)
  )
  
  INSERT INTO tbl_primarykeyPOST2
      SELECT '1', 'GURMIT SINGH'   UNION ALL
      SELECT '2', 'KISHORE KUMAR'  UNION ALL
      SELECT '3', 'SHAHID ANWAR'   UNION ALL
      SELECT '4', 'ANDREW'         UNION ALL
      SELECT '5', 'ISMAIL'
  
  SELECT * 
  FROM tbl_primarykeyPOST2
  
  ALTER TABLE tbl_primarykeyPOST2
      ALTER COLUMN EMPNAME VARCHAR NOT NULL 
  </code></pre>