不同数据库查看数据库版本的方法
1. Oracle数据库
select *from v$version
结果一般为:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0 - Production CORE 11.2.0.4.0 Production TNS for 64-bit Windows: Version 11.2.0.4.0 - Production NLSRTL Version 11.2.0.4.0 - Production
2. Sqlserver数据库
select @@version
一般的结果为:
Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64) Aug 22 2017 17:04:49 Copyright (C) 2017 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2019 Datacenter 10.0 <X64> (Build 17763: ) (Hypervisor)
3. PG数据库的方式:
select * from version();
一般的结果为:
PostgreSQL 10.4, compiled by Visual C++ build 1800, 64-bit