I am trying to reproduce the SQL Server default NEWID()
value for a UNIQUEIDENTIFIER
column in SQLite. It produces a UUID as a default for the column.
How can I do that in SQLite?
I found this page (Is there UID datatype in SQLITE if Yes then how to generate value for that) where they use a select statement but it is no good for DEFAULT.
NOTE : I am using the SQLite version implemented for browsers as I am using it through ionic and the cordova-sqlite plugin. So this does not contain all the features provided by SQLite and more importantly this does not contain the RANDOM
function.