title: Link a sequence with to an identity in hsqldb
body: <p>In PostgreSql, one can define a sequence and use it as the primary key of a table.  In HsqlDB, one can still accomplish creating an auto-increment identity column which doesn't link to any user defined sequence.  Is it possible to use a user defined sequence as the generator of an auto-increment identity column in HsqlDB?</p>
  
  <p>Sample sql in PostgreSql:</p>
  
  <pre><code>CREATE SEQUENCE seq_company_id START WITH 1;
  
  CREATE TABLE company (
    id bigint PRIMARY KEY DEFAULT nextval('seq_company_id'),
    name varchar(128) NOT NULL CHECK (name &lt;&gt; '')
  );
  </code></pre>
  
  <p>What's the equivalent in HsqlDB?  </p>
  
  <p>Thanks.</p>