On 7/27/07, Chase <[EMAIL PROTECTED]> wrote: > hhmmm... i just noticed something weird. if i insert a string of ANY > length or format into the uniqueidentifier field, sqlite allows it...
> so i guess it's just a text type under the hood with no rules enforced > on the format of the string inserted into it. sqlite datatypes are not like other database systems you may be used to: http://sqlite.org/datatype3.html > not sure if i like that. Browse through the docs to make sure sqlite is actually what you want :) > > sqlite> select "{" || hex(randomblob(4)) || "-" || hex(randomblob(2)) > > || "-" || hex(randomblob(2)) || "-" || hex(randomblob(2)) || "-" || > > hex(randomblob(6)) || "}"; > > {4EA4A842-6ACA-0A81-5B42-F9E1D295BC27} Note that this is *NOT* a GUID/UUID. Be very sure of your requirement: if you need a GUID, write a function that uses your platform tools to get one. If you just need some long random identifier, the above is fine, but don't call it a GUID. See RFC 4122. ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------