我有一个查询
SET @Query2 =
'SELECT * FROM My_tbl WHERE '+ @Condition2
根据@ Conditions5
所规定的某些条件从表“My_tbl”中检索数据DECLARE @Condition5 NVARCHAR(255) =(
SELECT * WHERE Field1 IS NOT NULL AND FIELD2 IS NOT NULL);
是否可以更新'My_tbl'表,使其更新并仅在执行@ Query2后保存数据值?
之类的:(错误的代码!)想得到你的意见,请...
UPDATE my_tbl
SET my_tbl = 'SELECT * FROM My_tbl WHERE '+ @Condition2