1
如何寫如果不存在,在SQL Server 2005語句以下條件如果不存在的語句在SQL Server 2005
如果@MeasurementId說值(1,2,3),這些都是現有的值下面的語句工作 但似乎當@ MeasurementId = 0時不工作...
If not exists(select Mat_Id,MeasurementId from MaterialQuantity where
[email protected] and [email protected])
然而上述說法似乎並不如在MeasurementId
列NULL
值工作。你要知道MeasurementId
是不是在這裏一個ForeignKey ...
如何分配NULL
如果@MeasurementId
爲0或使用@MeasurementId
,因爲它是在 where
聲明...
@AdaTheDev工作... – 2010-01-26 13:27:34