Different ways to get Oracle Software Release Number/Version Number:
SQL> SELECT version FROM V$INSTANCE;
VERSION ----------------- 12.2.0.1.0
SQL> select BANNER from v$version;
BANNER -------------------------------------------------------------------------------- Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production PL/SQL Release 12.2.0.1.0 - Production CORE 12.2.0.1.0 Production TNS for Linux: Version 12.2.0.1.0 - Production NLSRTL Version 12.2.0.1.0 - Production
SQL> set line 200
col version for a15
col PRODUCT for a50
col STATUS for a20
select * from PRODUCT_COMPONENT_VERSION;
PRODUCT                                 VERSION       STATUS --------------------------------------- -------------- ---------------------- NLSRTL                                 12.2.0.1.0    Production Oracle Database 12c Enterprise Edition  12.2.0.1.0    64bit Production PL/SQL                                 12.2.0.1.0    Production TNS for Linux:                         12.2.0.1.0    Production
SQL> SET SERVEROUTPUT ON
         BEGIN
         DBMS_OUTPUT.PUT_LINE(DBMS_DB_VERSION.VERSION || ‘.’ || DBMS_DB_VERSION.RELEASE);
         END;
          /
   12.2 PL/SQL procedure successfully completed.