SQL Server, or more specifically, Transact-SQL, includes a number of built in functions, including the @@version
scalar function. The @@version
function is a configuration function, which returns system and build information for the current installation of SQL Server. You can run this function at any time to find out which version of SQL Server you’re using.
Here’s how:
SELECT @@version;
When running that in a command line interface, you might see results that look like this:
Microsoft SQL Server 2017 (RTM-CU6) (KB4101464) - 14.0.3025.34 (X64) Apr 9 2018 18:00:41 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.4 LTS) 1 row(s) returned Executed in 1 ms