这是我的动态查询:
exec sp_executesql N'SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY NAME asc) peta_rn, peta_query.*
From (Select BOOK, PageINT, PageCHAR NAME, TYPE, PDF From test1 cdn
Inner Join test2 cwi
On cwi.ID = cdn.ID Where 1=1 And IsNull(NAME,'''') Like COALESCE(@0,'''') + ''%'' )
as peta_query) peta_paged WHERE peta_rn>@1 AND peta_rn<=@2',N'@0 varchar(4000),@1 bigint,@2 bigint',@0='Miller',@1=0,@2=50
如您所见,我只是在搜索,Miller
但我得到的名字也是空的。我在这里想念什么?任何帮助,将不胜感激。