Home select all available combination by specific field in one query
Reply: 0

select all available combination by specific field in one query

user718
1#
user718 Published in April 20, 2018, 10:48 am

I have table "teams" with fields: id, team_name

  id, team_name
  • 1, Real Madrid
  • 2, FC Barcelona
  • 3, juventus
  • 4, Milan

i want to select in one query all available VS combinations ...

like that:

Real Madrid - FC Barcelona

Real Madrid - juventus

Real Madrid - Milan

FC Barcelona - juventus

FC Barcelona - Milan

juventus - Milan

the purpose is to find solution for dynamic with different amount of rows if will be more teams in the tables...

this is possible? how... ?

Thanks :)

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.367261 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO