我有一個遞歸表中的SQL Server數據庫: MyTable:
ID : string PrimaryKey
Parent: string references MyTable - NOTNULL !!
,並用流利的NHibernate映射到 class MyTable
{
public virtual string ID {get; set;}
public vi
我希望能夠根據傳遞給它的參數的值來更改存儲過程中的where子句。 E.G. 這是我認爲它應該工作,但我不能讓它完全正確 Declare @param as int
set @param = 1
Select Productname
from product
where
case @param = 1 then productname = 1
else productname <>