我在MySQL [items, orderList]中创建了两个表,orderlist中的外键id引用了items中的主键id。现在我想从Java语言中的两个表中获取所有columns{id, name, price (in Items), and quantity (in orderList)},我如何才能只显示一次id,因为当我查询数据时,它会同时显示两个表中的id?
我有一个具有复合主键(indId,studentId)的实体学生。我想更新这个表中的一些行。我不知道在使用复合主键时如何编写更新查询(使用JPA)。寻求建议。谢谢。(Util.java:411)at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
at com.mysql.j
:om.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check(id VARCHAR(767) PRIMARY KEY,headers BLOB,text VARCHAR(32000),sta' at line 12014-03(id VARCHAR(767) PRIMARY KEY,headers BLOB,text VARCHAR(32000),sta