Home > database > Mysql field matching design of a value
Mysql field matching design of a value
Time:09-26
A user table, as follows: Id name manager1 manager2 manager3 1 * * A B C Li si E A 2 D
Demand for managers with A data in 123,
Is there a good way to query or to combine three fields through the algorithm into a field, and then the query? What kind of high efficiency? What's the algorithm can be implemented?
CodePudding user response:
Col1='A' or col2='A' or col3='A'
CodePudding user response:
1/f, positive solution Select * from table name where manager1='A' or manager2='A'='A' or manager3
CodePudding user response:
Manager1='A' or manager2='A'='A' or manager3 inefficient, there is no other good way,