Re: large import
- From: Hubert Figuiere <hub figuiere net>
- To: f-spot-list gnome org
- Subject: Re: large import
- Date: Thu, 27 Dec 2007 11:48:57 -0500
On Thu, 2007-12-27 at 08:10 -0800, Bill Moseley wrote:
> sqlite> .schema photos
> CREATE TABLE photos (
> id INTEGER PRIMARY KEY NOT NULL,
> time INTEGER NOT NULL,
> directory_path STRING NOT NULL,
> name STRING NOT NULL,
> description TEXT NOT NULL,
> roll_id INTEGER NOT NULL,
> default_version_id INTEGER NOT NULL
> );
>
> (The id is AUTOINCREMENT -- not sure why sqlite doesn't show that.)
>
Because according to the documentation:
> Specifying a PRIMARY KEY normally just creates a UNIQUE index on the
> corresponding columns. However, if primary key is on a single column
> that has datatype INTEGER, then that column is used internally as the
> actual key of the B-Tree for the table.
In short specifying id as it is is enough. :-)
Hub
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]