UUID insted of ID

Hi, is it possible to replace the "serial" column with UUID generation instead of the standard auto-increment when creating a schema in MySQL?
2 Replies
dakdevs
dakdevs2y ago
bumping this!
hisam
hisam2y ago
I am not really sure what's your intention here. But SERIAL itself is a number. Quoting from the official docs: (https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html#:~:text=SERIAL%20is%20an%20alias%20for,for%20NOT%20NULL%20AUTO_INCREMENT%20UNIQUE%20.)
SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.
SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.
If you want to use UUID, you can use varchar or any other string based type.
Want results from more Discord servers?
Add your server