declare
  cursor c_test_tbl2 is
    select t2.id, t2.salary
      from test_tbl2 t2, test_tbl1 t1
     where t2.id = t1.id
       and t2.salary <> t1.salary;
  c_row c_test_tbl2%rowtype;
begin
  for c_row in c_test_tbl2 loop
    dbms_output.put_line(c_row.id || '-' || c_row.salary);
  end loop;
end;

PLsql中,输出结果如下:

oracle创建游标和输出

 

 

相关文章:

  • 2021-11-25
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2022-01-24
猜你喜欢
  • 2022-01-02
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
相关资源
相似解决方案