-1
附近有語法錯誤「」
當我選擇當語句中使用的情況下,plz幫助我感謝錯誤!!!!
if語句:
declare @module nvarchar(max)='tenant'
if (@module='tenancy')
select 'All'
UNION
select distinct affect_table from sys_log where affect_table in ('contract','rent_free','dn_override')
情況下聲明:
select 'All'
UNION
select distinct affect_table from sys_log where affect_table in (case when @module='tenant' THEN ('contract','rent_free','dn_override'))