79706840

Date: 2025-07-19 00:13:33
Score: 2.5
Natty:
Report link

In modern versions of MySQL (8.4+) you just need to wrap it in parentheses:

CREATE TABLE FOO (
  id CHAR(36) PRIMARY KEY DEFAULT (UUID())
);

See also knowledge base on UUID:
https://dev.mysql.com/blog-archive/storing-uuid-values-in-mysql-tables/

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Pavel_JM