欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

postgresql sql批量更新記錄

 更新時間:2009年07月30日 18:54:10   作者:  
向postgresql中利用sql批量跟新記錄的實現(xiàn)代碼。
復(fù)制代碼 代碼如下:

CREATE FUNCTION updateTchrNm() RETURNS void AS
$body$
DECLARE
rownum integer := 1;
BEGIN
while rownum <= 1000 LOOP
    update t_tchr set tchr_nm = '田中愛子' || rownum, tchr_knm = 'タナカアイコ' || rownum, tchr_anm = 'tanaka' || rownum where tchr_cd = 'TCHR' || (1000000 + rownum);
    rownum := rownum + 1;
END LOOP;
return;
END;

$body$ LANGUAGE 'plpgsql';
select updateTchrNm();

相關(guān)文章

最新評論