MySQL Forums
Forum List  »  MySQL Workbench

UUID() as a field initialization/default value
Posted by: JK Heydt
Date: June 26, 2020 03:10PM

I wish to default/initialize a field called "RowID" (CHAR(36)) with the UUID() function but I just can't put that function in the Default field of the table designer. When I add a row it just puts the word 'UUID()' in the field.

What is the recommended way to make UUID() the default/initialization value for a field? Do I need to create a trigger?

Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
UUID() as a field initialization/default value
1171
June 26, 2020 03:10PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.