Question

I am using Simple.Data as my Micro-ORM for my ASP.NET / MySQL website. I already know how to insert data when the primary key is auto incremental Int, but How can I insert data when I need to generate an idea using the uuid_short() function over a Bigint column?

Was it helpful?

Solution

You could use a trigger to set the column value, as in this answer: Can I use a function for a default value in MySql?

Or you can generate a value in your application code and insert it normally.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top