[sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
Hi,

I've searched and can not find where the keywords like PRIMARY, UNIQUE, 
etc. in the Documentation.  Please point me to the correct section.
Also, if I use autoincrement, how do I retrieve the new index value for 
use in other tables?  Again a doc. pointer would be good.

Thanks!
Vance

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread D. Richard Hipp

On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:

> Hi,
>
> I've searched and can not find where the keywords like PRIMARY,  
> UNIQUE,
> etc. in the Documentation.  Please point me to the correct section.
> Also, if I use autoincrement, how do I retrieve the new index value  
> for
> use in other tables?  Again a doc. pointer would be good.

http://www.sqlite.org/lang_keywords.html

>
>
> Thanks!
> Vance
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

D. Richard Hipp
d...@hwaci.com



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
I have seen that list of keywords, but I'm looking for a description of 
what they mean.  In particular those associated with index definitions.

Vance

D. Richard Hipp wrote:

>On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:
>
>  
>
>>Hi,
>>
>>I've searched and can not find where the keywords like PRIMARY,  
>>UNIQUE,
>>etc. in the Documentation.  Please point me to the correct section.
>>Also, if I use autoincrement, how do I retrieve the new index value  
>>for
>>use in other tables?  Again a doc. pointer would be good.
>>
>>
>
>http://www.sqlite.org/lang_keywords.html
>
>  
>
>>Thanks!
>>Vance
>>
>>___
>>sqlite-users mailing list
>>sqlite-users@sqlite.org
>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>
>D. Richard Hipp
>d...@hwaci.com
>
>
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
Could this be what you're looking for?

On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff  wrote:
> I have seen that list of keywords, but I'm looking for a description of
> what they mean.  In particular those associated with index definitions.
>
> Vance
>
> D. Richard Hipp wrote:
>
>>On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:
>>
>>
>>
>>>Hi,
>>>
>>>I've searched and can not find where the keywords like PRIMARY,
>>>UNIQUE,
>>>etc. in the Documentation.  Please point me to the correct section.
>>>Also, if I use autoincrement, how do I retrieve the new index value
>>>for
>>>use in other tables?  Again a doc. pointer would be good.
>>>
>>>
>>
>>http://www.sqlite.org/lang_keywords.html
>>
>>
>>
>>>Thanks!
>>>Vance
>>>
>>>___
>>>sqlite-users mailing list
>>>sqlite-users@sqlite.org
>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>>
>>D. Richard Hipp
>>d...@hwaci.com
>>
>>
>>
>>___
>>sqlite-users mailing list
>>sqlite-users@sqlite.org
>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
>>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
oops, sorry, here's the link: http://www.sqlite.org/lang.html

On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous  wrote:
> Could this be what you're looking for?
>
> On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff  wrote:
>> I have seen that list of keywords, but I'm looking for a description of
>> what they mean.  In particular those associated with index definitions.
>>
>> Vance
>>
>> D. Richard Hipp wrote:
>>
>>>On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:
>>>
>>>
>>>
Hi,

I've searched and can not find where the keywords like PRIMARY,
UNIQUE,
etc. in the Documentation.  Please point me to the correct section.
Also, if I use autoincrement, how do I retrieve the new index value
for
use in other tables?  Again a doc. pointer would be good.


>>>
>>>http://www.sqlite.org/lang_keywords.html
>>>
>>>
>>>
Thanks!
Vance

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


>>>
>>>D. Richard Hipp
>>>d...@hwaci.com
>>>
>>>
>>>
>>>___
>>>sqlite-users mailing list
>>>sqlite-users@sqlite.org
>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>>>
>>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread Vance E. Neff
Thanks Daniel,

Not really, I'm guessing I'll have to find documentation on SQL in order 
to find detailed information on field and index field descriptors or 
modifiers, such as INTEGER, PRIMARY, KEY, AUTOINCREMENT, etc.

Any recommendations?

Vance

Daniel Watrous wrote:

>oops, sorry, here's the link: http://www.sqlite.org/lang.html
>
>On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous  wrote:
>  
>
>>Could this be what you're looking for?
>>
>>On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff  wrote:
>>
>>
>>>I have seen that list of keywords, but I'm looking for a description of
>>>what they mean.  In particular those associated with index definitions.
>>>
>>>Vance
>>>
>>>D. Richard Hipp wrote:
>>>
>>>  
>>>
On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:





>Hi,
>
>I've searched and can not find where the keywords like PRIMARY,
>UNIQUE,
>etc. in the Documentation.  Please point me to the correct section.
>Also, if I use autoincrement, how do I retrieve the new index value
>for
>use in other tables?  Again a doc. pointer would be good.
>
>
>  
>
http://www.sqlite.org/lang_keywords.html





>Thanks!
>Vance
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>
D. Richard Hipp
d...@hwaci.com



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users






>>>___
>>>sqlite-users mailing list
>>>sqlite-users@sqlite.org
>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>  
>>>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread Griggs, Donald
Hi Vance,

Could you maybe give one or two examples on exactly what you need that
you're not finding on the website?   

As far as syntax, it's pretty much all linked from:
  http://www.sqlite.org/lang.html

E.g. for automatically incrementing primary key, see:
   http://www.sqlite.org/lang_createtable.html#rowid
   (if you must have an auto-incrementing key other than an integer
primary key, you will need to implement it yourself via a trigger)

As far as typing, sqlite differs from many other databases:
  http://www.sqlite.org/datatype3.html 

As far as a manual on SQL itself, yes, you would need to look elsewhere.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-29 Thread Daniel Watrous
It might help if you explained what you're trying to do.  Are you new
to SQL and want a good tutorial?

On Thu, Jan 29, 2009 at 11:28 AM, Vance E. Neff  wrote:
> Thanks Daniel,
>
> Not really, I'm guessing I'll have to find documentation on SQL in order
> to find detailed information on field and index field descriptors or
> modifiers, such as INTEGER, PRIMARY, KEY, AUTOINCREMENT, etc.
>
> Any recommendations?
>
> Vance
>
> Daniel Watrous wrote:
>
>>oops, sorry, here's the link: http://www.sqlite.org/lang.html
>>
>>On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous  wrote:
>>
>>
>>>Could this be what you're looking for?
>>>
>>>On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff  wrote:
>>>
>>>
I have seen that list of keywords, but I'm looking for a description of
what they mean.  In particular those associated with index definitions.

Vance

D. Richard Hipp wrote:



>On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:
>
>
>
>
>
>>Hi,
>>
>>I've searched and can not find where the keywords like PRIMARY,
>>UNIQUE,
>>etc. in the Documentation.  Please point me to the correct section.
>>Also, if I use autoincrement, how do I retrieve the new index value
>>for
>>use in other tables?  Again a doc. pointer would be good.
>>
>>
>>
>>
>http://www.sqlite.org/lang_keywords.html
>
>
>
>
>
>>Thanks!
>>Vance
>>
>>___
>>sqlite-users mailing list
>>sqlite-users@sqlite.org
>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
>>
>D. Richard Hipp
>d...@hwaci.com
>
>
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>
>
>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



>>___
>>sqlite-users mailing list
>>sqlite-users@sqlite.org
>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>
>>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Frank Juestel
Hi Vance,

Here we go with a list of  SQLite keywords:

http://www.sqlite.org/lang_keywords.html

Best regards
Franky

- Ursprüngliche Nachricht -
Von: "Vance E. Neff" 
An: "General Discussion of SQLite Database" 
Gesendet: Donnerstag, 29. Januar 2009 15.38 Uhr (GMT+0100) Europe/Berlin
Betreff: [sqlite] Index keywords

Hi,

I've searched and can not find where the keywords like PRIMARY, UNIQUE, 
etc. in the Documentation.  Please point me to the correct section.
Also, if I use autoincrement, how do I retrieve the new index value for 
use in other tables?  Again a doc. pointer would be good.

Thanks!
Vance

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


-- 
Frank Juestel
mailto: frank.jues...@jsmarts.de
phone:  +49 6002 930955

Frankfurt Office:
JSM Arts IT Consulting GbR
JSM Arts Webservices GbR
Am Pfahlgraben 19
61239 Ober-Moerlen
Germany

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Vance E. Neff
Hi Frank,

I'm looking for their meanings and details.

Vance

Frank Juestel wrote:

>Hi Vance,
>
>Here we go with a list of  SQLite keywords:
>
>http://www.sqlite.org/lang_keywords.html
>
>Best regards
>Franky
>
>- Ursprüngliche Nachricht -
>Von: "Vance E. Neff" 
>An: "General Discussion of SQLite Database" 
>Gesendet: Donnerstag, 29. Januar 2009 15.38 Uhr (GMT+0100) Europe/Berlin
>Betreff: [sqlite] Index keywords
>
>Hi,
>
>I've searched and can not find where the keywords like PRIMARY, UNIQUE, 
>etc. in the Documentation.  Please point me to the correct section.
>Also, if I use autoincrement, how do I retrieve the new index value for 
>use in other tables?  Again a doc. pointer would be good.
>
>Thanks!
>Vance
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Wilson, Ron P
If you click the link for 'create table' on the page below, you get
here:

http://www.sqlite.org/lang_createtable.html

Most of the constraint keywords are explained briefly there.

RW

Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Daniel Watrous
Sent: Thursday, January 29, 2009 1:10 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Index keywords

oops, sorry, here's the link: http://www.sqlite.org/lang.html

On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous 
wrote:
> Could this be what you're looking for?
>
> On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff 
wrote:
>> I have seen that list of keywords, but I'm looking for a description
of
>> what they mean.  In particular those associated with index
definitions.
>>
>> Vance
>>
>> D. Richard Hipp wrote:
>>
>>>On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>I've searched and can not find where the keywords like PRIMARY,
>>>>UNIQUE,
>>>>etc. in the Documentation.  Please point me to the correct section.
>>>>Also, if I use autoincrement, how do I retrieve the new index value
>>>>for
>>>>use in other tables?  Again a doc. pointer would be good.
>>>>
>>>>
>>>
>>>http://www.sqlite.org/lang_keywords.html
>>>
>>>
>>>
>>>>Thanks!
>>>>Vance
>>>>
>>>>___
>>>>sqlite-users mailing list
>>>>sqlite-users@sqlite.org
>>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>>>
>>>
>>>D. Richard Hipp
>>>d...@hwaci.com
>>>
>>>
>>>
>>>___
>>>sqlite-users mailing list
>>>sqlite-users@sqlite.org
>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>
>>>
>>>
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Vance E. Neff
Thanks Ron,

That was what I was looking for.  Just did not know where to find it.
When I INSERT a new row with INTEGER PRIMARY KEY AUTOINCREMENT specified 
for the key column, how do I find out what the new value for that column 
(the new key value) as that may be the only unique column value in the 
table?

Vance

Wilson, Ron P wrote:

>If you click the link for 'create table' on the page below, you get
>here:
>
>http://www.sqlite.org/lang_createtable.html
>
>Most of the constraint keywords are explained briefly there.
>
>RW
>
>Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453
>
>-Original Message-
>From: sqlite-users-boun...@sqlite.org
>[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Daniel Watrous
>Sent: Thursday, January 29, 2009 1:10 PM
>To: General Discussion of SQLite Database
>Subject: Re: [sqlite] Index keywords
>
>oops, sorry, here's the link: http://www.sqlite.org/lang.html
>
>On Thu, Jan 29, 2009 at 11:09 AM, Daniel Watrous 
>wrote:
>  
>
>>Could this be what you're looking for?
>>
>>On Thu, Jan 29, 2009 at 11:04 AM, Vance E. Neff 
>>
>>
>wrote:
>  
>
>>>I have seen that list of keywords, but I'm looking for a description
>>>  
>>>
>of
>  
>
>>>what they mean.  In particular those associated with index
>>>  
>>>
>definitions.
>  
>
>>>Vance
>>>
>>>D. Richard Hipp wrote:
>>>
>>>  
>>>
>>>>On Jan 29, 2009, at 9:38 AM, Vance E. Neff wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I've searched and can not find where the keywords like PRIMARY,
>>>>>UNIQUE,
>>>>>etc. in the Documentation.  Please point me to the correct section.
>>>>>Also, if I use autoincrement, how do I retrieve the new index value
>>>>>for
>>>>>use in other tables?  Again a doc. pointer would be good.
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>http://www.sqlite.org/lang_keywords.html
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Thanks!
>>>>>Vance
>>>>>
>>>>>___
>>>>>sqlite-users mailing list
>>>>>sqlite-users@sqlite.org
>>>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>D. Richard Hipp
>>>>d...@hwaci.com
>>>>
>>>>
>>>>
>>>>___
>>>>sqlite-users mailing list
>>>>sqlite-users@sqlite.org
>>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>___
>>>sqlite-users mailing list
>>>sqlite-users@sqlite.org
>>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>>
>>>  
>>>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Igor Tandetnik
"Vance E. Neff"  wrote
in message news:4982fd7c.2090...@intouchmi.com
> When I INSERT a new row with INTEGER PRIMARY KEY AUTOINCREMENT
> specified for the key column, how do I find out what the new value
> for that column (the new key value) as that may be the only unique
> column value in the table?

http://sqlite.org/lang_corefunc.html
last_insert_rowid

http://sqlite.org/c3ref/last_insert_rowid.html

Igor Tandetnik



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Vance E. Neff
Thank you Igor!

Just to be straight, I would use the Query:
SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX

Vance

Igor Tandetnik wrote:

>"Vance E. Neff"  wrote
>in message news:4982fd7c.2090...@intouchmi.com
>  
>
>>When I INSERT a new row with INTEGER PRIMARY KEY AUTOINCREMENT
>>specified for the key column, how do I find out what the new value
>>for that column (the new key value) as that may be the only unique
>>column value in the table?
>>
>>
>
>http://sqlite.org/lang_corefunc.html
>last_insert_rowid
>
>http://sqlite.org/c3ref/last_insert_rowid.html
>
>Igor Tandetnik
>
>
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-01-30 Thread Igor Tandetnik
Vance E. Neff  wrote:
> Just to be straight, I would use the Query:
> SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX

No, you would just do

select last_insert_rowid();

Or you could call sqlite3_last_insert_rowid() API directly.

Last inserted ROWID is the property of a connection, not of a table.

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-02-09 Thread Vance E. Neff
Can I do the

select last_insert_rowid();

to determine the new index value
After the COMMIT command?

Vance




Igor Tandetnik wrote:

>Vance E. Neff  wrote:
>  
>
>>Just to be straight, I would use the Query:
>>SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX
>>
>>
>
>No, you would just do
>
>select last_insert_rowid();
>
>Or you could call sqlite3_last_insert_rowid() API directly.
>
>Last inserted ROWID is the property of a connection, not of a table.
>
>Igor Tandetnik 
>
>
>
>___
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-02-09 Thread P Kishor
On Mon, Feb 9, 2009 at 9:44 AM, Vance E. Neff  wrote:
> Can I do the
>
> select last_insert_rowid();
>
> to determine the new index value
> After the COMMIT command?

Yes, but I am not sure what you mean by the "new index value"... keep
in mind, the last_insert_rowid() returns, well, the last inserted
rowid.



>
> Vance
>
>
>
>
> Igor Tandetnik wrote:
>
>>Vance E. Neff  wrote:
>>
>>
>>>Just to be straight, I would use the Query:
>>>SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX
>>>
>>>
>>
>>No, you would just do
>>
>>select last_insert_rowid();
>>
>>Or you could call sqlite3_last_insert_rowid() API directly.
>>
>>Last inserted ROWID is the property of a connection, not of a table.
>>
>>Igor Tandetnik
>>
>>



-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Index keywords

2009-02-09 Thread Vance E. Neff
Thanks Puneet,

Yes, it does seem to work.  I just finished testing that.
I'm determining the new index value for an autoincrement primary key to 
that I can refer to it via other tables.

Vance

P Kishor wrote:

>On Mon, Feb 9, 2009 at 9:44 AM, Vance E. Neff  wrote:
>  
>
>>Can I do the
>>
>>select last_insert_rowid();
>>
>>to determine the new index value
>>After the COMMIT command?
>>
>>
>
>Yes, but I am not sure what you mean by the "new index value"... keep
>in mind, the last_insert_rowid() returns, well, the last inserted
>rowid.
>
>
>
>  
>
>>Vance
>>
>>
>>
>>
>>Igor Tandetnik wrote:
>>
>>
>>
>>>Vance E. Neff  wrote:
>>>
>>>
>>>  
>>>
Just to be straight, I would use the Query:
SELECT last_insert_rowid() AS TheNewKeyValue FROM TableX




>>>No, you would just do
>>>
>>>select last_insert_rowid();
>>>
>>>Or you could call sqlite3_last_insert_rowid() API directly.
>>>
>>>Last inserted ROWID is the property of a connection, not of a table.
>>>
>>>Igor Tandetnik
>>>
>>>
>>>  
>>>
>
>
>
>  
>

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users