我正在尝试以下查询
`select
skillmgt.*, competences.Competence_Description
from skillmgt
inner join competences
on skillmgt.eid=competences.competence_id
where eid=121 and datename(yyyy,timestamp)=2013`
查询成功运行,但它没有返回任何结果,尽管我的结果eid's
等于 somecompetence_id's
并且该where
子句也是 true
实际上,即使没有该where
子句,它也不起作用!
编辑:通过这样做解决了它:
select skillmgt.*,competences.* from competences
join skillmgt
on competences.competence_id=skillmgt.cid
where skillmgt.eid=121 and datename(yyyy,skillmgt.timestamp)='2013'