第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

怎么又錯誤啊

package jdbc;


import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;


public class Liu {

private static final String URL="jdbc:mysql://127.0.0.1:3306/imooc";

private static final String USER="root";

private static final String PASSWORD="123456";

public static void main(String[] args) throws Exception {

// TODO Auto-generated method stub

? ? Class.forName("com.mysql.jdbc.Driver");

? ?Connection conn=DriverManager.getConnection(URL, USER, PASSWORD);

? ? Statement stmt=conn.createStatement();

? ?ResultSet rs= stmt.executeQuery("select user_name,age form imooc_goddess");

? ?while(rs.next()) {

? ?System.out.println(rs.getString("user_name")+","+rs.getInt("age"));

? ?}

}


}


正在回答

1 回答

錯誤顯示

Exception in thread "main" com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'imooc_goddess' at line 1

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3277)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3206)

at com.mysql.jdbc.Statement.executeQuery(Statement.java:1232)

at jdbc.Liu.main(Liu.java:17)


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

怎么又錯誤啊

我要回答 關注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號