I don't think there's any built-in way but you can create a custom function for it pretty easily. Are you using sqlite directly or a wrapper?
Sam ------------------------------------------- We're Hiring! Seeking a passionate developer to join our team building products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] -----Original Message----- From: Chase [mailto:[EMAIL PROTECTED] Sent: Friday, July 27, 2007 4:03 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] how do i generate a uniqueidentifier ? sorry. should have been more specific. i'm talking about guids (or uuids). here's the create table line: CREATE TABLE foobar (id uniqueidentifier, foo text, bar text, PRIMARY KEY (id)); that works great, but i have not been able so far to generate a fresh guid to insert into the table. in ms-sql, you'd use newid(), for example: insert into foobar values (newid(), "Aaa", "Bbb"); and then you'd get something like: select * from foobar; id foo bar ___________________________________________________________ {00000109-0000-0010-8000-00AA006D2EA4} "Aaa" "Bbb" so how is this done in sqlite3? - chase ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------