XML資料儲存至表中(批量)

2021-05-23 18:23:46 字數 700 閱讀 5036

declare @payment xml

set @payment='1

t2346 1t

123123

'--將xml格式的支付帳號字串轉換成table並將資料插入客戶支付方式表中

if isnull(cast(@payment as varchar(max)),'')<>''

begin

insert into userpayment

( paytype,account,payconfig

)select

t2.[type].value('.','varchar(1)') as [type],

t2.way.value('.','varchar(1)') as way,

t2.[content].value('.','varchar(max)') as [content]

from

( select

t.records.query('type') as [type],

t.records.query('way') as way,

t.records.query('content') as [content]

from @payment.nodes('dataset/table') as t(records)

) as t2

end

批量遷移oracle表儲存

場景 marine遇到問題,要求將某使用者的表從表空間a移動到表空間b,使用者表的個數在1000 以上 分析1 首先可以確定的是針對使用者單張表移動表空間使用alter table table name remove tablespace tablespace name這種ddl語句實現 其次需要查...

資料儲存和xml

1.開啟io流把檔案寫入內部儲存 getcachedir 得到的file物件的路徑是data data com.itheima.rwinrom2 cache 系統管理應用介面的清除快取,會清除cache資料夾下的東西,清除資料,會清除整個包名目錄下的東西 第5 7位 rwx,表示跟檔案擁有者使用者同...

MYSQL批量建表儲存過程

分表比較多的情況,如何批量建立,可通過儲存過程實現 建立乙個儲存過程 紅色表結構,藍色為表名及表數量 delimiter create procedure sp create tab begin set str id int 11 not null auto increment comment 自增...