这是我的控制台输出:
`[10, name, N, 11-11, Address, 12, City, XX, 123-123-123, 321-321-321, maaaail]
INSERT INTO CUSTOMER (CUSTOMER_ID, NAME, ZIP, ADDRESSLINE1, ADDRESSLINE2, CITY, STATE, PHONE, FAX, EMAIL) VALUES (10','name','11-11','Address','12','City','XX','123-123-123','321-321-321','maaaail)
java.sql.SQLSyntaxErrorException: Syntax error: Encountered "\',\'" at line 1, column 117.`
这是我的代码:
System.out.println(Arrays.toString(dane));
sql = "INSERT INTO CUSTOMER (CUSTOMER_ID, NAME, ZIP, ADDRESSLINE1, ADDRESSLINE2, CITY, STATE, PHONE, FAX, "
+ "EMAIL) VALUES (" + dane[0] + "','" + dane[1] + "','" + dane[3] + "','" + dane[4] + "','"
+ dane[5] + "','" + dane[6] + "','" + dane[7] + "','" + dane[8] + "','" + dane[9] + "','" + dane[10] + ")";
System.out.println(sql);