Please let me know if there is a better way to query an Oracle database (8i or 10g) to know the version of the database software via SQLPlus session. The only way we know how to query an Oracle database is to submit a very complicated parsing query, like the following:
where banner like 'Oracle%' and rownum < 2;
if myVersion >= 10 then
Print " This is a 10g or later version of Oralce Database.";
I'm thinking to myself that there must be a variable in a data dictionary table, an imbedded procedure or function to obtain the version of the Oracle database.