Thomas Briggs wrote:
See http://www.sqlite.org/autoinc.html - INTEGER PRIMARY KEY will
autoincrement only until you delete a row from the table.
The above seems overstated.
INTEGER PRIMARY KEYs with or without the AUTOINCREMENT keyword behave
identically unless 1) the last row is deleted
s@sqlite.org
> Subject: Re: [sqlite] How to determine if a column is autoincremented?
>
> You learn something new everyday. I didn't know that was the
> behaviour of
> INTEGER PRIMARY KEY. All other databases I've worked with
> require you to
> explicitly dec
E my_table (
id INTEGER PRIMARY KEY,
...
)
This would meet your criteria, but 'id' is not an autoincremented column.
--
Mario Gutierrez
mario.l.gutierrez @ hotmail.com
From: "David M. Cook" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
Subject
On Sat, Oct 22, 2005 at 12:19:04PM -0700, Mario Gutierrez wrote:
> Thanks for the reply.
>
> This would not work as I could define a table like this
>
> CRETE TABLE my_table (
> id INTEGER PRIMARY KEY,
> ...
> )
>
> This would meet your criteria, but 'id' is not an autoincremented column.
OK,
On Sun, Oct 23, 2005 at 09:24:58PM -0700, David M. Cook wrote:
> On Sat, Oct 22, 2005 at 12:19:04PM -0700, Mario Gutierrez wrote:
>
> > CRETE TABLE my_table (
> > id INTEGER PRIMARY KEY,
> > ...
> > )
> >
> > This would meet your criteria, but 'id' is not an autoincremented column.
>
> Sorry,
oincremented column.
--
Mario Gutierrez
mario.l.gutierrez @ hotmail.com
From: "David M. Cook" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to determine if a column is autoincremented?
Date: Sat, 22 Oct 2005 10:52:20 -
On Sat, Oct 22, 2005 at 12:19:04PM -0700, Mario Gutierrez wrote:
> CRETE TABLE my_table (
> id INTEGER PRIMARY KEY,
> ...
> )
>
> This would meet your criteria, but 'id' is not an autoincremented column.
Sorry, I don't get it. Why is it not? Also, why would one do that? If I
wanted an non-a
. Cook" <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to determine if a column is autoincremented?
Date: Sat, 22 Oct 2005 10:52:20 -0700
On Fri, Oct 21, 2005 at 05:38:28PM -0700, Mario Gutierrez wrote:
> I'm w
--
Mario Gutierrez
mario.l.gutierrez @ hotmail.com
From: Kurt Welgehausen <[EMAIL PROTECTED]>
Reply-To: sqlite-users@sqlite.org
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to determine if a column is autoincremented?
Date: Sat, 22 Oct 2005 12:49:30 -0500
select sql from sqlite_m
On Fri, Oct 21, 2005 at 05:38:28PM -0700, Mario Gutierrez wrote:
> I'm writing a SQLite adapter for a code generation tool. I'm a little
> stumped on how you query SQLite to determine if a column is
> autoincremented. I've tried
An auto-increment column is defined as INTEGER PRIMARY KEY, so loo
select sql from sqlite_master
where type='table' and tbl_name='my_table' and sql like '%autoincrement%'
OR
select sql like '%autoincrement%'
from (select sql from sqlite_master
where type='table' and tbl_name='my_table')
Regards
Hi all,
I'm writing a SQLite adapter for a code generation tool. I'm a little
stumped on how you query SQLite to determine if a column is autoincremented.
I've tried
PRAGMA table_info('my_table');
which returns all the columns for the table including a flag to tell if the
column is
12 matches
Mail list logo