title: Is string to integer conversion automatic in SQL?
body: <p>I have a SQL statement to insert a record into a table.  The table is defined as;</p>
  
  <pre><code>+-------------+--------------+------+-----+---------+----------------+
  | Field       | Type         | Null | Key | Default | Extra          |
  +-------------+--------------+------+-----+---------+----------------+
  | id          | int(11)      | NO   | PRI | NULL    | auto_increment |
  | title       | varchar(255) | NO   |     | NULL    |                |
  | description | text         | NO   |     | NULL    |                |
  | filename    | varchar(255) | NO   |     | NULL    |                |
  | type        | varchar(255) | NO   |     | NULL    |                |
  | size        | int(11)      | NO   |     | NULL    |                |
  +-------------+--------------+------+-----+---------+----------------+
  </code></pre>
  
  <p>The SQL statement is;</p>
  
  <pre><code>INSERT INTO photos 
    (title, description, filename, type, size) 
  VALUES 
    ('Title D', 'Description D', 'Filename_D', 'BMP', '2000');
  </code></pre>
  
  <p>I was always taught that if you did not match column type to the type of data you were trying to insert or update, SQL would throw an error.</p>
  
  <p>To my surprise the SQL statement worked in MySQL and MS Access even though the "size" column is defined as integer and the size data in the SQL statement is enclosed in quotes making it a string ('2000'). </p>
  
  <p>Is this a MySQL and MS Access feature or is this how SQL works across all SQL compliant databases?</p>