如何使用for循环在postgresql中插入数据?

我想知道如何使用for循环在postgresql中插入数据

我想在id的行中插入1到1000

请尝试使用下面的代码在表中使用for循环插入值

do$$
开始
对于1..1000循环中的r
在schema_name.table_name(id)值(r)中插入;
端环;
终止
$$;

发表评论