Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: From SQL> How to query Oracle version?
In SQL*Plus you have a pre-defined variable _O_RELEASE that gives
you the Oracle version.
You can also use the v$version view.
With Oracle 7.3.4:
v734>def
DEFINE _SQLPLUS_RELEASE = "800050000" (CHAR) DEFINE _EDITOR = "Notepad" (CHAR) DEFINE _O_VERSION = "Oracle7 Server Release 7.3.4.1.0 - ProductionWith the distributed, replication and parallel query options PL/SQL Release 2.3.4.1.0 - Production" (CHAR) DEFINE _O_RELEASE = "703040100" (CHAR) v734>select * from v$version;
BANNER
5 rows selected.
With Oracle 8.0.5:
v805>def
DEFINE _SQLPLUS_RELEASE = "800050000" (CHAR) DEFINE _EDITOR = "Notepad" (CHAR) DEFINE _O_VERSION = "Oracle8 Enterprise Edition Release 8.0.5.0.0 -Production
BANNER
5 rows selected.
Cheong a écrit dans le message <37dcbf13_at_news.lhsgroup.com>...
>Hello:
>
>From SQL> prompt, I had to run the following "script" to get what Oracle
>version I am currently running on (by supplying a known table name).
>
>Is there another simpler select statement (or describe, or whatever within
>SQL>) that can tell what Oracle version I am currently using (without having
>to exit SQL*Plus and invoke SVRMGRL)?
>
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>COLUMN sysdate NOPRINT HEADING ''
>
>TTITLE 'Oracle Release: ' SQL.RELEASE
>
>SELECT sysdate
>FROM sys.dual
>/
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>Thank you all and have a nice day!
>
>Regards,
>Cheong
>
>
Received on Mon Sep 13 1999 - 04:40:02 CDT
![]() |
![]() |