Sunday, July 21, 2019

Mysql UUID


How to created UUID in mysql?

■ GUID/UUID
GUID: Globally Unique Identifier
UUID: Universally Unique Identifier

■ UUID
   aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
・Select UUID() as UUID.
・Insert Tbl (id, name) values (UUID(), 'test')
・Select replace(UUID(),"-","") as UUID
 ・INSERT INTO t_inventive_principle (`id`,`code_num`,`name`) VALUES (REPLACE(UUID(),"-",""),1,'分割原理');