Oracle ENVIRONMENT VARIABLES
Version 12.1.0.1

Product Homes
Query to identify home directories for Oracle products set linesize 121
set pagesize 20
col host_name format a30
col home_name format a20
col home_location format a50

SELECT *
FROM sysman.mgmt$software_homes;
 
Release Number
Release Number Demo SELECT &_O_RELEASE
FROM dual;
 
SQL%ROWCOUNT
Update Demo conn uwclass/uwclass

CREATE TABLE t (
testcol VARCHAR2(10));

INSERT INTO t (testcol) VALUES ('ABCDEFG');
INSERT INTO t (testcol) VALUES ('ABCXEFG');
INSERT INTO t (testcol) VALUES ('ABCYEFG');
INSERT INTO t (testcol) VALUES ('ABCDEFG');
INSERT INTO t (testcol) VALUES ('ABCZEFG');
COMMIT;

BEGIN
  UPDATE t
  SET testcol = 'UPDATED'
  WHERE testcol LIKE '%D%';

  IF SQL%ROWCOUNT = 0 THEN
    INSERT INTO t
    (testcol)
    VALUES
    ('12345567');
  END IF;
END;
/

BEGIN
  UPDATE t
  SET testcol = 'UPDATED'
  WHERE testcol LIKE '%S%';

  IF SQL%ROWCOUNT = 0 THEN
    INSERT INTO t
    (testcol)
    VALUES
    ('0000000');
  END IF;
END;
/

Related Topics
DBMS_SYSTEM.GET_ENV
Exception Handling
System Events

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved