# code-block-pro/1.27.5/build/shiki/samples/plsql.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.27.5. 21 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/plsql.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.27.5/raw/build/shiki/samples/plsql.sample
- Modified: 2023-09-03T01:04:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/plsql.sample#L10-L20`.

```
-- available online in file 'examp1'
DECLARE
   qty_on_hand  NUMBER(5);
BEGIN
   SELECT quantity INTO qty_on_hand FROM inventory
      WHERE product = 'TENNIS RACKET'
      FOR UPDATE OF quantity;
   IF qty_on_hand > 0 THEN  -- check quantity
      UPDATE inventory SET quantity = quantity - 1
         WHERE product = 'TENNIS RACKET';
      INSERT INTO purchase_record
         VALUES ('Tennis racket purchased', SYSDATE);
   ELSE
      INSERT INTO purchase_record
         VALUES ('Out of tennis rackets', SYSDATE);
   END IF;
   COMMIT;
END;

-- From https://docs.oracle.com/cd/B10500_01/appdev.920/a96624/01_oview.htm#7106

```
