Vishal Joshi

Vishal Joshi

  • 300
  • 5.6k
  • 90k

SQL query to compare comma separated values in order by manner.

Mar 1 2023 9:52 AM

Have data in the database like the below table.

ID Data
1 4963,4960
2 4961,4963

User input values can be like 4963,4960 or 4960,4963 both should match.

Please share the SQL query which matches both cases.

Thanks


Answers (3)