mardi 19 octobre 2021

SQL Server: 1 random in join 2 tables [closed]

I have table1 and table2; I need a result set where for each row in table 1 there will be 1 random value from table 2.

Example:

  • table #1: (1; 2; 3; 4; 5)
  • table #2: (a; b; c)

Desired result set:

(1,c; 2,b; 3,a; 4,a; 5,b)



Aucun commentaire:

Enregistrer un commentaire