Oracle changed the release schedule for their database, announcing that version 12.2.0.2 will be called "Oracle Database 18c."
What is the version number of the database, 12.2.0.2 or 18.x.x.x?
Internally 18c identifies itself as version 18.
On API level:
$ cat /u01/app/oracle/product/18.1.0.0/dbhome_1/rdbms/public/ociver.h
#ifndef OCIVER_ORACLE
#define OCIVER_ORACLE
#define OCI_MAJOR_VERSION 18 /* Major release version */
#define OCI_MINOR_VERSION 0 /* Minor release version */
#endif
And also on SQL level:
SQL> SELECT VERSION FROM PRODUCT_COMPONENT_VERSION;
VERSION
----------
18.0.0.0.0
And also on JDBC level:
java -jar /u01/app/18.1.0.0/grid/jdbc/lib/ojdbc8.jar
Oracle 18.0.0.0.0 JDBC 4.2 compiled with javac 1.8.0_152 on Wed_Dec_06_05:42:32_PST_2017
#Default Connection Properties Resource
#Thu May 31 12:52:24 CEST 2018