postgresql生成測試數據存儲過程

CREATE OR REPLACE FUNCTION ADD_TEST() returns text as $$
declare
    detail_count integer;

  
begin
    detail_count=0;
	  WHILE detail_count < 9553116   LOOP
	  --insert 語句
		  detail_count = detail_count+1;
 	 end loop;
 	 RETURN '';
end;
$$ LANGUAGE plpgsql;
相關文章
相關標籤/搜索