且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在SQL中选择查询

更新时间:2022-04-15 06:56:42

hihirn
我认为这对您有帮助:

选择案例已付款
何时(
从[表名]中选择*,其中Profilevisited> profilelimit和schemeexpiry> getdate()
),然后显示"false"
当(从[表名]中选择*,其中Profilevisited< = profilelimit和schemeexpiry< = getdate())时为"true"
底壳

来自[tablename]


如果这对您有帮助,请在vipsha16.com上回复我
hi hiren
I think this will help u :

select case ispaid
when (
select * from [tablename] where Profilevisited >profilelimit and schemeexpiry > getdate()
) then "false"
when (select * from [tablename] where Profilevisited <= profilelimit and schemeexpiry <= getdate()) then "true"
end case

from [tablename]


please reply me on vipsha16.com if this will help u