戻る

複数行を返すストアードプロシジャの例

0001: CREATE PROCEDURE PF_N_SGFO(
0002:   FAMILYNAMEIN NCHAR VARYING(24)
0003: )
0004: RETURNS(
0005:   SEQNO       INTEGER,
0006:   ORDERNAME   NCHAR VARYING(24),
0007:   ORDERJPN    CHAR  VARYING(12),
0008:   FAMILYNAME  NCHAR VARYING(24),
0009:   FAMILYJPN   CHAR  VARYING(20),
0010:   GENUSNAME   NCHAR VARYING(24),
0011:   GENUSJPN    CHAR  VARYING(12),
0012:   SPECIESNAME NCHAR VARYING(40),
0013:   SPECIESJPN  CHAR  VARYING(20),
0014:   SPECIESENG  NCHAR VARYING(40)
0015: )
0016: AS
0017: BEGIN
0018:   SELECT  FAMILYNAME, FAMILYJPN, ORDERNAME
0019:     FROM  FAMILY
0020:     WHERE FAMILYNAME=:FAMILYNAMEIN
0021:     INTO  :FAMILYNAME, :FAMILYJPN, :ORDERNAME;
0022:   SELECT  ORDERJPN
0023:     FROM  ORDERTAB
0024:     WHERE ORDERNAME=:ORDERNAME
0025:     INTO  :ORDERJPN;
0026:   FOR
0027:     SELECT GENUSNAME, GENUSJPN
0028:       FROM GENUS
0029:       WHERE FAMILYNAME=:FAMILYNAME
0030:       ORDER BY SEQNO
0031:       INTO  :GENUSNAME, :GENUSJPN
0032:   DO
0033:     FOR
0034:       SELECT  SEQNO, SPECIESNAME, SPECIESJPN, SPECIESENG
0035:         FROM  SPECIES
0036:         WHERE GENUSNAME=:GENUSNAME
0037:         ORDER BY SEQNO
0038:         INTO  :SEQNO, :SPECIESNAME, :SPECIESJPN, :SPECIESENG
0039:     DO
0040:       SUSPEND;
0041: END;

この HTML を検査する。( XHTML 1.0 Strict で書かれています )
Another HTML Lint Gateway ( Mirrored by htmllint.oosato.org )