When one-to-multiple tables are not created, they are often stored in one field as separators. the cost of doing so is that they cannot be directly associated with the query in one-to-multiple tables, generally, separate queries are performed after splitting in the program. For example, how can we directly use "one-to-multiple" to store "multiple" in a field of "one" in the form of delimiters when no intermediate table is created, the cost of doing so is that the query cannot be directly associated with one-to-many requests. generally, separate queries are used in programs. For example:
How can I query the results directly using SQL statements?
You can use an sequence number table. except for consecutive IDs, the value range of IDS is determined by the number of information stored in "1.
Implement SQL:
SELECTNAME, REPLACE (SUBSTRING_INDEX (mobile, ',',. id), CONCAT (SUBSTRING_INDEX (mobile, ',',. id-1), ','), '') AS mobileFROMsquence into ss join (SELECTNAME, CONCAT (mobile, ',') AS mobile, LENGTH (mobile) -LENGTH (REPLACE (mobile, ',', '') + 1 AS sizeFROM 'user') B ON. id <= B. size