请帮我。我想在存储过程中创建动态搜索查询。这段代码遵循我在查询构建器中编写并运行的查询,但在 C# 代码中使用时不会运行我的表名info有 3 列,id int, name nvarchar(50), family nvarchar(50)。SELECT Id, [name ], family, descriptionFROM infoWHERE (@n IS NULL) AND (@f IS NULL) OR (@n IS NULL) AND (family = @f) OR ([name ] = @n) AND (@f IS NULL) OR ([name ] = @n) AND (family = @f)
- 2 回答
- 0 关注
- 148 浏览
添加回答
举报
0/150
提交
取消