搜索sql语句

2020-02-29 作者:网络时代   |   浏览(186)

CREATEproceduredbo.select_a @bvarchar(50), @cvarchar(50), @dvarchar(50), @evarchar(50) as declare@strsqlvarchar(5000); set@strsql='select*fromawhere1=1'; if@b'' set@strsql=@strsql+'andb="'+@b+'"'; if@c'' set@strsql=@strsql+'andc="'+@c+'"'; if@d'' set@strsql=@strsql+'andd="'+@d+'"'; if@e'' set@strsql=@strsql+'ande="'+@e+'"'; exec(@strsql) GO

本文由澳门新葡亰网址大全发布于网络时代,转载请注明出处:搜索sql语句

关键词: