find sql server version code example Example 1: sql version query SELECT @@VERSION AS 'SQL Server Version'; Example 2: sql server check version SELECT @@version