Home > Back-end >  String query processing
String query processing

Time:09-30

Two column from a table, column content is similar to a "aa, bb, ab, dd," like "type 1" column b content, usually through a column to query the value of the corresponding column b, but now need to sort a column after the content "aa, ab, and bb, dd" for the conditions to query the content of the column b, don't know how to implement?

CodePudding user response:

Look not to understand, select * from table order by column a?????

CodePudding user response:

The select column from table where field a=b?? Column a is a comma separated string

CodePudding user response:

This question, you should go to SQL area amount

Need to field a content query, string split again, and then reorder and query for column b

CodePudding user response:

Look not to understand topic
Best give the insert statement generated sample records
And then give the result record

Like this
Select * from TB
Where fielda like '%' + fieldb + '%'
?

CodePudding user response:

Select * from table where field condition of a=order by column b
  • Related