與價值觀如何插入行重視
CREATE TABLE #tbl
(
id int identity(1,1),
object_type int ,
object_id nvarchar(50),
refl nvarchar(4000)
)
REFL值有這樣參數應用表:
<prov><CProv><object_type>1</object_type><object_id>152</object_id></CProv></prov>
<prov><CProv><object_type>0</object_type><object_id>150</object_id></CProv></prov>
<prov><CProv><object_type>0</object_type><object_id>156</object_id></CProv></prov>
<prov><CProv><object_type>1</object_type><object_id>172</object_id></CProv></prov>
我想選擇所有的數據至極是REFL另一個值declare @val nvarchar(4000)
。 這可能嗎?當我嘗試select @val = refl from #tbl
它只選擇最後一行,我想選擇所有行。它怎麼樣?它必須像
@val = N'<prov><CProv><object_type>1</object_type><object_id>152</object_id></CProv></prov>
<prov><CProv><object_type>0</object_type><object_id>150</object_id></CProv></prov>
<prov><CProv><object_type>0</object_type><object_id>156</object_id></CProv></prov>
<prov><CProv><object_type>1</object_type><object_id>172</object_id></CProv></prov>'
你的意思是說有4分排在#tbl表? – DarkKnight
@HardCoreProgrammer是有4行 – GeoVIP