这是我的代码
SELECT * FROM DOCUMENT
WHERE CREATED_DATE BETWEEN $startDate AND $endDate
AND (EMP_ID = $empId OR $empId IS NULL)
答案 0 :(得分:0)
将类路径设置为mysql jar文件。由于此jar文件中提供了com.mysql.jdbc.Driver
类。
String DB_URL = "jdbc:mysql://localhost/Hotel_management";
String USER = "username";
String PASS = "password";
conn = DriverManager.getConnection(DB_URL,USER,PASS);