"David A. Cobb" <[EMAIL PROTECTED]> wrote:
> It appears that, given SQLite's Manifest Typing, the appropriate type of 
> a UUID -- 16bytes, binary -- would be BLOB.  One would not want to try 
> converting the ID to anything, if only for the cost in time.
> 
> Can a BLOB be the Primary Key for a table?
> 

Yes, a BLOB can be a primary key in SQLite.

I, however, usually use a hex encoding since that easier
to deal with when debugging the database using text-based
tools.  I typically create UUIDs as follows:

  INSERT INTO demo1(uuid) VALUES(hex(randomblob(16)));

--
D. Richard Hipp <[EMAIL PROTECTED]>

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to