- 论坛徽章:
- 0
|
declare
cursor my_cursor is
select CHECKINGBALANCE, FIRSTNAME, SSN from accttable;
my_rec varchar(20);
begin
open my_cursor;
loop
fetch my_cursor into my_rec;
exit when my_cursor%notfound;
if my_rec.checkingbalance > 2000 then
insert into huye_temp valus (my_rec.CHECKINGBALANCE, my_rec.FIRSTNAME, my_rec.SSN);
end if;
end loop;
close my_cursor;
end;
运行后的报错~~555~~
#################################
test_cc_5.sql: line 2: cursor: command not found
test_cc_5.sql: line 3: syntax error near unexpected token `FIRSTNAME,'
test_cc_5.sql: line 3: `select CHECKINGBALANCE, FIRSTNAME, SSN from accttable;' |
|