I am new to SQL and am trying to do the following.
i am using SQLite browser to edit the current file I have
I do have a SQLite database with around 1500 rows of data that I would like to create a GUID for.
I created the Col with the name GUID
and has a default value of NULL
.
My update script looks like:
UPDATE "main"."MyLab" SET guid = (select hex( randomblob(4)) || '-' || hex( randomblob(2))
|| '-' || '4' || substr( hex( randomblob(2)), 2) || '-'
|| substr('AB89', 1 + (abs(random()) % 4) , 1) ||
substr(hex(randomblob(2)), 2) || '-' || hex(randomblob(6)) )
This gives the same value to all 1,500 rows. I want a unique value for each row.