问题
What query should be used to change the username of H2 database in embedded mode with JDBC? I need to update the username with the input string from the user.
回答1:
Use this query Note:The password will become invalid when the user name was changed
alter user "+username+" rename to "+newusername+"//alter username
alter user"+newusername+" set password '"+password+"' //alter password
来源:https://stackoverflow.com/questions/39347825/how-to-update-change-user-account-name-in-h2-database-using-jdbc