我建了一张报表,需要用到a,b,c三张表的部分字段,a,b,c三张表的关系在d表d.USERID =a.ID and d.DEPARTMENTID=b.ID and d.POSTID=c.ID 东西做好了之后发现无法进行填报,插入和删除,会报错 Column not found: NAME in statement [INSERT INTO a (USERNAME,REALNAME,NAME,POSTNAME,MOBILE,EMAIL) VALUES (?,?,?,?,?,?)] REALNAME,NAME 这两个字段在b,c表 这是我写的数据库查询语句 SELECT a.USERNAME as 用户名,a.REALNAME as 姓名,b.NAME as 部门,c.POSTNAME as 职务,a.MOBILE as 手机,Fa.EMAIL as 邮箱 FROM a,b,c,d WHERE d.USERID =a.ID and d.DEPARTMENTID=b.ID and d.POSTID=c.ID (如果解释不清楚的话,请回复) |
最佳回答 |
||||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|
|||
0
|
|