The CREATE TABLE TestB (Names VARCHAR (20))
INSERT INTO TestA VALUES (A, B, C ', '22,44,66')
INSERT INTO TestA VALUES (A, B, C, D, '22,44,66,88')
INSERT INTO TestB VALUES (' B, C, A ')
INSERT INTO TestB VALUES (' D, B, C, A ')
How to judge Names fields ABC=BCA=CAB, ABCD=ABDC=BACD etc
CodePudding user response:
String, sorting, joining together again, after processing can be used directly group by name having count (1) & gt;=2 determine whether repeatedCodePudding user response:
Good idea, I just want to in the string, how to compare, unexpectedly sorted in joining together, there is no other way?CodePudding user response: