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Œ”ˆê——•\Ž¦AcursorAexecute 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—lX‚ȏî•ñ‚𓾂邱‚Æ‚ª‚Å‚«‚é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 ServletAJSP •ÒŽ‘—¿
¡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-2017 Y.SAK