Schemas

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Schemas

Vivien Malerba
Hi!

I'm working on the SQLite interface between the Libgda library and the
SQLite database. For the job, I need to know information about the
database schema, and I'm using the PRAGMA statements regarding
schemas.

However I can't find the information about the AUTO INCREMENT
attribute of a column. Can anyone help me?

Thanks a lot,

Vivien
Reply | Threaded
Open this post in threaded view
|

Re: Schemas

Firman Wandayandi
On 9/27/05, Vivien Malerba <[hidden email]> wrote:

> Hi!
>
> I'm working on the SQLite interface between the Libgda library and the
> SQLite database. For the job, I need to know information about the
> database schema, and I'm using the PRAGMA statements regarding
> schemas.
>
> However I can't find the information about the AUTO INCREMENT
> attribute of a column. Can anyone help me?
>

here they are,

http://sqlite.org/datatypes.html
http://sqlite.org/datatype3.html

> Thanks a lot,
>
> Vivien
>


--
Firman Wandayandi
Never Dreamt Before (http://php.hm/~firman/)
Reply | Threaded
Open this post in threaded view
|

Re: Schemas

Vivien Malerba
2005/9/28, Firman Wandayandi <[hidden email]>:

> On 9/27/05, Vivien Malerba <[hidden email]> wrote:
> > Hi!
> >
> > I'm working on the SQLite interface between the Libgda library and the
> > SQLite database. For the job, I need to know information about the
> > database schema, and I'm using the PRAGMA statements regarding
> > schemas.
> >
> > However I can't find the information about the AUTO INCREMENT
> > attribute of a column. Can anyone help me?
> >
>
> here they are,
>
> http://sqlite.org/datatypes.html
> http://sqlite.org/datatype3.html
>

I don't mean finding information about how to create AUTO INCREMENT
fields but about how to get that information for each field of an
already existing table in the database (like when using PRAGMA
table_info('table')).

Thanks,

Vivien
Reply | Threaded
Open this post in threaded view
|

Re: Schemas

Firman Wandayandi
On 9/28/05, Vivien Malerba <[hidden email]> wrote:

> 2005/9/28, Firman Wandayandi <[hidden email]>:
> > On 9/27/05, Vivien Malerba <[hidden email]> wrote:
> > > Hi!
> > >
> > > I'm working on the SQLite interface between the Libgda library and the
> > > SQLite database. For the job, I need to know information about the
> > > database schema, and I'm using the PRAGMA statements regarding
> > > schemas.
> > >
> > > However I can't find the information about the AUTO INCREMENT
> > > attribute of a column. Can anyone help me?
> > >
> >
> > here they are,
> >
> > http://sqlite.org/datatypes.html
> > http://sqlite.org/datatype3.html
> >
>
> I don't mean finding information about how to create AUTO INCREMENT
> fields but about how to get that information for each field of an
> already existing table in the database (like when using PRAGMA
> table_info('table')).
>

Oh, sorry, you can use

SELECT * FROM sqlite_master

and find yourself where the auto increment column form "sql" column
with "AUTOINCREMENT" as the wild card, I dunno another solution.

> Thanks,
>
> Vivien
>

Hope help you,
--
Firman Wandayandi
Never Dreamt Before (http://php.hm/~firman/)