oracle8.1.6 select apm_package_version.version_name_greater(:version_name, highest.version_name) from (select version_name from apm_package_versions where version_id = apm_package.highest_version(:package_key) ) as highest