功能,但并不功能...声明变量不是在用我要声明Postgres里变量的Postgres
Declare
c varchar;
a integer;
b integer;
select b = count (*) from table
set a = 1
while a <= b
begin
select c = [c] from table where id = a
if (c = '1')
insert into table2 select(*) from table
end
set a = a+1
但错误错误:在语法错误或接近“VARCHAR” LINE 2:C VARCHAR; ^ 我希望有人能帮助我