I would like to initialize the H2 database, but I'm not sure if the records exist. If they exist, I do not want to do anything, but if they do not exist, I would like to write the default values.
Something like that:
IF 'number of rows in ACCESSLEVELS' = 0
INSERT INTO ACCESSLEVELS VALUES
(0, 'admin'),
(1, 'SEO'),
(2, 'sales director'),
(3, 'manager'),
(4, 'REP')
;
source
share