How to Update/Change user account name in H2 database using JDBC?

☆樱花仙子☆ 提交于 2019-12-11 05:29:13

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!