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