![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
「PL/SQL」の記事一覧
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
PL/SQL のサブプログラムのオーバーロード
CREATE OR REPLACE PACKAGE RIVUS.OVERLOADING IS FUNCTION COMPLEX(N NUMBER) RETURN NUMBER; FUNCTION COMPLEX(N PL […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
IS NULL または IS NOT NULL 比較 pl/sql
declare vnum NUMBER; begin if (vnum IS NULL) then dbms_output.put_line(‘NUMBER 変数は 初期化されていません’); e […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
BEWEEN a AND b 比較 pl/sql
declare vnum NUMBER; begin vnum := 5; if (vnum BETWEEN 1 AND 10) then dbms_output.put_line(‘NUMBER 変数は 1 […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
IN比較 pl/sql
declare vstr varchar2(10); begin vstr := ‘東京’; if (vstr IN (‘茨城’,’栃木’,R […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
ESCAPE pl/sql
declare vstr varchar2(30); begin vstr := ‘オレンジ100%ジュース’; if (vstr LIKE ‘%\%%’ ESCAPE & […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
LIKE pl/sql
declare vstr varchar2(10); begin vstr := ‘東京都’; if (vstr LIKE ‘%京都%’) th […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
Oracleユーザの作成
下記のコードは、rivusというユーザ名を新たに作成するコード。 ストアドプロシージャのFunctionなどを作成する際には、ユーザ名が必要となるため、 事前に作成しておく必要がある。 CREATE USER rivus […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
ストアドプロシージャの作成1
RIVUSユーザでFunctionを作成した。 CREATE OR REPLACE FUNCTION RIVUS.PRODUCT ( P_NUM1 IN NUMBER, P_NUM2 IN NUMBER ) […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
ストアドプロシージャの定義と実行について
ストアドプロシージャの定義と実行 ストアドプロシージャ(ファンクション)とは、Oracle データベースに格納(ストアド)されたプロシージャやファンクションのこと。 主に手続きのある処理を高速に処理するための手段である。 […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
IF文 pl/sql
DECLARE vNum NUMBER := 10; vMsg VARCHAR2(255); BEGIN — 条件はイコール1つで評価する。 — IF ~ THEN までの文末のセミコロン(;)は […]
![](https://skyit.biz/wp-content/themes/keni80_wp_standard_all_202202060158/images/no-image.jpg)
For文 pl/sql
pl/sql FOR~END文 BEGIN — — 1 ~ 3 の 3 回ループ 通常のFOR文 FOR i IN 1..3 LOOP DBMS_OUTPUT.PUT_LINE( […]