On 14 Jun 2009, at 2:23pm, Kermit Mei wrote:
> I want to create a new table, its primary key is an int 'id' column,
> but
> I don't want to insert the data by hand, I hope the system can
> generate
> it by adding id.
>
> For example,
> mytable(id, name, age)
>
> When I insert name and age, the id is generated automatically.
Just don't mention the id column when you insert data:
INSERT INTO mytable (name, age) VALUES ('Frank', 18)
> How can I import data from a file, and SPECIFY the column?
The above might answer your question, but if it doesn't, we probably
need to know how you are doing your importing: are you writing your
own software or using a tool we're all familiar with ?
Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users