how to check the version of sqlserver by query code example Example: sql server check version SELECT @@version