title: Auto increment an ID with a string prefix in oracle sql?
body: <p>I have created the following table and I wish to have the userID auto-increment whenever there is a row added to the database. However I would like the ID to be formatted as 000001 for example as below, since there are a few tables and it would be ideal to give each ID a string prefix:</p>
  
  <pre><code>userID
  ----------
  user000001
  user000002
  user000003
  
  
  CREATE TABLE UserTable (
  userID VARCHAR(20),
  username VARCHAR(250) NOT NULL,
  firstName VARCHAR(250) NOT NULL,
  lastName VARCHAR(250) NOT NULL,
  CONSTRAINT pkUserID
      PRIMARY KEY (userID),
  CONSTRAINT uniUsername
      UNIQUE (username)
  );
  </code></pre>