Table 'imooc.imooc' doesn't exist
private static final String URL = "jdbc:mysql://localhost:3306/imooc"; Exception in thread "main" com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'imooc.imooc' doesn't exist?
在cmd 運行后的數據庫中有這個表,是不是路徑寫錯了??
求解答!謝謝!
2017-08-10
哎,它提示了“找不到imooc”這張表,"jdbc:mysql://localhost:3306/imooc"這句話中,最后的“imooc”是數據庫,不是表格,你把ResultSet resultSet = statement.executeQuery("select user_name ,age from imooc");中的imooc改成表名就行了,要學會自己看錯誤提示,我也是新手,一起學習吧