How to split a single row in to multiple columns in mysql

前端 未结 5 1335
轻奢々
轻奢々 2021-01-16 08:50

Simply Asking, Is there any function available in mysql to split single row elements in to multiple columns ? I have a table row with the fields, user_id, user_name, u

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-16 09:30

    This is a bad design, If you can change it, store the data in 2 tables:

    table users: id, name, surname ...
    
    table users_location: user_id (fk), location
    

    users_location would have a foreign key to users thorugh user_id field

提交回复
热议问题