How to get Sql Server version and operating system?


Sql query to get version and operation system.

 
SELECT SERVERPROPERTY ('productversion') as [Version], SERVERPROPERTY ('edition') as OS