title: SQL Insert Into a MAX value
body: <p>In SQL how would I insert into a MAX count of another column</p>
  
  <p>So I have this</p>
  
  <pre><code>INSERT INTO USER(id,name,employee_code,email) VALUES (3,john,(SELECT MAX(employee_code)+1 FROM USER),"john@example.com");
  </code></pre>
  
  <p>However this doesn't work with the syntax... basically it's like an autoincrement that I have to self build because the employee_code sometimes equals 0 for temporary employees so I need a command to take the max code in their and add one.</p>