with insertdata as(
SELECT chr(int4(random()*26)+97) as c1,
chr(int4(random()*26)+97)||chr(int4(random()*26)+97)||round(random()*1000000) as c2, 0 as c3,
now() as c4, now() as c5, generate_series(1,1000000) as c6
)
INSERT INTO public.tablename(id, name, flag, create_date, update_date)
SELECT c1,c2,c3,c4,c5 from insertdata;
postgresq 试用with select插入测试(模拟)数据
最新推荐文章于 2025-07-08 15:59:21 发布