select sysuser.username ,gysypml.id from sysuser where gysypml.usergysid=sysuser.sysid 这一个查询语句中,where条件用gysypml.usergysid肯定不合适啊
就像select * from a where b.id=a.id 你觉得合适吗?
你应该是要做联合查询吧,那就是select a.username ,b.id from sysuser a inner join gysypml b on b.usergysid=a.sysid,如果还需要其他的字段,自己在select后面添加~