【发布时间】:2011-05-31 19:19:36
【问题描述】:
我需要为 SQL Server 编写一个存储过程。 它必须是这样的:
Select * from tblSomething
Where param in (If param1 like 'string' select * from tblTable where condition1
Else select * from tblTable where condition2)
所有 if else 示例的问题都打印了一些内容并且不返回选择查询。 你能帮忙吗???
【问题讨论】:
-
只是我还是这个问题由于发布的示例而变得更加混乱?提供样本数据、预期结果等。
-
只有你。这不是一个普通的 SQL SELECT 语句。
标签: sql-server tsql stored-procedures