In the H2 database in the table with the Type UUID column , how do we indicate that we want H2 to generate the default UUID value when INSERTomits this field?
INSERT
I know how to create a UUID . I read the question, How to insert a specific UUID into the h2 database? .
My question is how to get H2 to generate a UUID value on my behalf.
You can use the built-in function RANDOM_UUID():
RANDOM_UUID()
create table test(id int primary key, data uuid default random_uuid()); insert into test(id) values(1); select * from test;
, UUID ( ) , ( , H2).
Source: https://habr.com/ru/post/1663574/More articles:TamperMonkey - message between scripts on different subdomains - javascriptTesting a file system with Jest? - node.jsOn iOS, is creating an instance of the new controller to be used? Or is it already created? - iosОтправка двоичного кода через HTTP с помощью API React-Native Fetch - httpIs there a way to get the size of an existing widget? - flutterRxJS: Observable.create () vs. Observable.from () - javascriptКак вставить конкретный UUID в базу данных h2? - mysqlRxJS: How to import Just - javascriptStrictMode violation: StrictModeDiskReadViolation, WriteViolation on Android - androidJava 8 Optional Null Check - javaAll Articles