查看各类型数据库版本的SQL(Oracle/DB2/SQL Server/PG/MySQL)

Oracle

查询语句:
select * from v$version;
查询结果:
BANNER
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE	11.2.0.2.0	Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production

SQL Server

查询语句:
select * from v$version;
查询结果:
field1
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) 
	Apr  2 2010 15:48:46 
	Copyright (c) Microsoft Corporation
	Developer Edition (64-bit) on Windows NT 6.1  (Build 7600: ) (Hypervisor)

DB2

查询语句:
SELECT service_level, fixpack_num FROM TABLE (sysproc.env_get_inst_info());
查询结果:
SERVICE_LEVEL  FIXPACK_NUM  
-------------  -----------  
DB2 v9.7.0.0   0 

MySQL

查询语句:
select version();
查询结果
version()
5.7.22

PostgreSQL

查询语句:
select version();
查询结果:
version
PostgreSQL 9.2.23 on x86_64-redhat-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16), 64-bit


你可能感兴趣的:(大数据)