SSMS
 sql >> Base de Dados >  >> Database Tools >> SSMS

Combine as 1 principais instruções SQL selecionadas


Outra opção é usar o COM LAÇOS cláusula
Select top 1 with ties 
       software, auditDate, versionNumber 
 From  table1 
 Where software IN ('software1','software2','software3','software4')
 Order By Row_Number() over (Partition By software Order By auditDate Desc)