SAK }‘ŠÙ

SAK Streets ƒƒCƒ“ƒXƒgƒŠ[ƒg }‘ŠÙEƒJƒtƒF ˆê—— SAK Streets ŒŸõ
| VB | SQL | Perl | PHP | ASP | JSP | C | PC | HP | FAQ | ƒtƒŠ[ƒ\ƒtƒg |

Oracle PL/SQL •Ò20 - ƒŒƒR[ƒhŒ”ˆê——•\Ž¦AcursorAexecute immediate

¡ƒe[ƒuƒ‹ƒŒƒR[ƒhŒ”ˆê——•\Ž¦

  Eƒe[ƒuƒ‹‚̈ꗗ‚ÆŠeƒe[ƒuƒ‹‚̃ŒƒR[ƒhŒ”‚ð•\Ž¦‚·‚é‚É‚ÍAƒe[ƒuƒ‹ˆê——
    Žæ“¾‚Æ“®“I SQL(‚±‚±‚Å‚ÍAexecute immediate) ‚ðŽg—p‚·‚éB
    ‰ž—p‚·‚ê‚ÎA—lX‚Èî•ñ‚𓾂邱‚Æ‚ª‚Å‚«‚éB

set serveroutput on;

declare

  cursor cu is
    select tname ƒe[ƒuƒ‹ from tab where tabtype = 'TABLE' order by tname;
  recct  number;

begin

-- ƒe[ƒuƒ‹ƒŒƒR[ƒhŒ”ˆê——•\Ž¦
  dbms_output.put_line('=====================================================');
  dbms_output.put_line('ƒe[ƒuƒ‹ƒŒƒR[ƒhŒ”ˆê——');
  dbms_output.put_line('=====================================================');
  dbms_output.put_line('ƒe[ƒuƒ‹                                         Œ”');
  dbms_output.put_line('-----------------------------------------------------');
  for cu_rec in cu loop
    execute immediate 'select count(*) from ' || cu_rec.ƒe[ƒuƒ‹ into recct;
    dbms_output.put_line(
      rpad(cu_rec.ƒe[ƒuƒ‹, 40) || ' ' ||
      to_char(recct, '999,999,999')
    );
  end loop;
  dbms_output.put_line('=====================================================');

end;
/

¡Oracle PL/SQL •ÒŽ‘—¿
¡SQL Šî‘bŽÀ’n•ÒŽ‘—¿
¡SQL Šî‘b•ÒŽ‘—¿
¡SQL ƒ`ƒ…[ƒjƒ“ƒO•ÒŽ‘—¿
¡PostgreSQL •ÒAJAVA ServletAJSP •ÒŽ‘—¿
¡MySQL •ÒŽ‘—¿
| VB | SQL | Perl | PHP | ASP | JSP | C | PC | HP | FAQ | ƒtƒŠ[ƒ\ƒtƒg |

SAK Streets ƒƒCƒ“ƒXƒgƒŠ[ƒg }‘ŠÙEƒJƒtƒF ˆê—— SAK Streets ŒŸõ



Copyright (C) 1999-2024 Y.SAK