0
我正在嘗試做一個表(@tbl)運行時並從數據庫中插入select語句中的數據,因爲我已經完成的工作是sql查詢在運行時創建一個表,並從數據庫的select語句中插入值
declare @tbl TABLE (
Item int
)
begin
insert into @tbl values select cid from tbl_custumer where cus_ph like '%'+'987'+'%'
select * from @tbl
end
爲「選擇CID」的語句返回的多條記錄
這是解決thanx先生 – sam5808