我有两张表
select stName,stCard cowaCard,cowaComelate,cowaAskFoLeave,cowaDay,cowaYear,cowaDate from PmCheckOnWorkAttendance as pc,PmStaff as ps where pc.cowaCard = ps.stCard表
PmStaff PmCheckOnWorkAttendance
怎么进行查询啊。 这条语句老报错
select stName,stCard cowaCard,cowaComelate,cowaAskFoLeave,cowaDay,cowaYear,cowaDate from PmCheckOnWorkAttendance as pc,PmStaff as ps where pc.cowaCard = ps.stCard表
PmStaff PmCheckOnWorkAttendance
怎么进行查询啊。 这条语句老报错
select stName,stCard cowaCard,cowaComelate,cowaAskFoLeave,cowaDay,cowaYear,cowaDate from PmCheckOnWorkAttendance pc,PmStaff ps where pc.cowaCard = ps.stCard上面你定义的那些要显示的字断 也要带上表的别名如:
select pc.stName from PmCheckOnWorkAttendance pc,PmStaff ps where pc.cowaCard = ps.stCard
多表查询和spring有什么关系?
太模糊
导致sql引擎无法识别
这样写a.id,a.name