34,588
社区成员
发帖
与我相关
我的任务
分享
select t1.* , t2.*
case when t1.year is not null and t1.year >= t2.d1 + t2.d2 then '可以'
else '不可以'
end
from time t1 , day t2 where t1.id = t2.id
case when time1.year is not null and time1.year>day.d1+day.d2 then '可以'
when time1.year is null and time2.year>day.d1+day.d2 then ' 不可以'
end
if exists(select 1 from time1 a, day1 b where a.[year]>b.[d1]+b.[d2])
print '可以'
如果表time1中year字段的值不存在,并且表time2中year字段的值大于表day中d1字段和d2字段的和,则输出“可以”,
???这个不是冲突了?