check sql server version command prompt code example Example: sql server check version SELECT @@version