Java – how to check that we use Oracle 8i database in JDBC?

In JDBC, how to check that we are using Oracle 8i database?

Solution

Connection connection = DriverManager.getConnection(url);
Connection connection = DriverManager.getConnection(url);
DatabaseMetaData Meta = connection.getMetaData();
String product = Meta.getDatabaseProductName();
String major = Meta.getDatabaseMajorVersion();
String minor = Meta.getDatabaseMinorVersion();
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>