Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How does mysql convert several fixed strings into columns as temporary table queries?
How does mysql convert several fixed strings into columns as temporary table queries?
The db2 database has a values function that can be used for the operation you mentioned, but mysql itself does not have such a function.

The following is a clever way to write, and you can also get the data you want. As shown in the figure:

Choice?

trim(substring _ index(substring _ index(a . num,',',b.help_topic_id? +? 1),','? ,-? 1))? As? dead

From where? (

Choice?

'39982665399,3902343 1098,3976497448 1,39055572973,39897342743,40 127675336,40 174795679'? As? num?

From where? Double? )? Answer?

Join? apsc.help_topic? b? Open? b.help_topic_id? & lt (length (quantity)? -? Length (? Replace (No.,',',? '')? )? +? 1? )

I hope I can help you!