Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

SQL Server AutoIncrement variiert je nach Wert eines anderen Felds

select pk1,pk2,ROW_NUMBER() over (partition by pk1,pk2 order by (select 0)) as AIfield
from yourtable