[英]Is it possible to create a database on fly in PostgreSQL for Azure using Java code if it does not exist? If yes, how?
I want to create database and tables on the fly in PostgreSQL in Azure cloud using Java code .我想使用 Java 代码在 Azure 云中的 PostgreSQL 中动态创建数据库和表。 How to create a database in PostgreSQL for Azure using Java code if it does not exist?
如果不存在,如何使用Java代码在PostgreSQL为Azure创建数据库?
Connect to the server through an Admin User通过管理员用户连接到服务器
And run the following query:并运行以下查询:
CREATE DATABASE database_name OWNER your_owner;
For more information check this .有关更多信息,请查看此。
This is plain Java though, you have to check whether something like this is possible in Azure.虽然这是普通的 Java,但您必须检查在 Azure 中是否可能出现类似的情况。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.