我必须列出要分配给"employee"的所有"shift"数据,但如果员工数据中已经存在轮班数据,则不得将其包括在内.让我们看看图片样本.
This query solves the problem. I found this here:
Scott's Blog
select * from shift where not exists
(select 1 from employeeshift where shift.shiftid = employeeshift.shiftid
and employeeshift.empid = 57);
让我们看看结果:
现在我的问题是,我怎样才能在林肯做到这一点?我使用的是实体框架