3 Replies Latest reply on Mar 18, 2020 8:44 PM by Erik van Roon

    sqlcl script run query based on database version

    Marek Läll

      Hi,

       

      At sqlcl startup/login I would like to execute different select statements in login.sql based on database version.

      Example:

       

      if "database version" >= 18

        execute: "select INSTANCE_NAME, HOST_NAME, VERSION_FULL from v$instance"

      else

        execute: "select INSTANCE_NAME, HOST_NAME, VERSION from v$instance"

       

      Scripting seems one solution for that.

      Any hints about how to identify short and native way the database version?

       

      Regards,

      Marek Läll