On 6/28/07, Bruno S. Oliveira <[EMAIL PROTECTED]> wrote:
CREATE TABLE te_representation (repres_id INTEGER AUTO_INCREMENT NOT NULL ,layer_id INTEGER ,geom_type INTEGER ,geom_table TEXT ,description TEXT ,lower_x REAL ,lower_y REAL ,upper_x REAL ,upper_y REAL ,res_x REAL ,res_y REAL , num_cols INTEGER ,num_rows INTEGER ,initial_time TEXT ,final_time TEXT , PRIMARY KEY (repres_id) );
To add to this, you're also getting bit by sqlite's loose parsing of column type data. It determines affinity by heuristically matching the rest of the parameters (http://sqlite.org/datatype3.html section 2.1), but that means it accepts pretty much any text there. "auto_increment" is having no effect in your column definition. To get an id column that is the btree key, with implicit 64bit integer datatype and not null, your two options are: create table foo(id integer primary key); create table foo(id integer, primary key(id)); To add the guarantee that automatically generated values will never be reused, your only option is: create table foo(id integer primary key autoincrement); No other syntax will work, including "auto_increment", and it is not possible to create another column with the same characteristics using the built-in "autoincrement". Yeah, it's a bit of hack. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------

