Version requirements: JDK 1.7 and later.
Download a proper JAR package based on the requirements at the Microsoft official website. Click here to download.
The following code snippet is used to import the JDK to the project by using sqljdbc42.jar:
String userName = “user”; //Default user name
String userPwd = “pass321”; //Password
java.sql.Connection dbConn = DriverManager.getConnection(url, userName, userPwd);
Object sta = dbConn.createStatement();
String sql = “create table student”+ “ (id int , name varchar(10))”;
int row = ((Statement) sta).executeUpdate(sql);
If the problem persists, contact Alibaba Cloud After-Sales Technical Support.
Thank you! We've received your feedback.