how to check which version of sql server is being used with a database code example Example: sql server check version SELECT @@version