我有一个包含 id 和人名的标题表。然后我有很多表格包含那个特定人的详细信息,例如电话号码、地址、性别、出生地等。
如何在加入所有这些表后返回 SELECT 命令,但仅在一个 json 填充列中返回它?
输出应该是这样的:{"id":''236732", "name":"John Doe", "phone": "4875696", ... }
我真的可以吗?
table_header## 标题##
3 无名氏
5000简丝
table_detail id phone_number 1 34574358 2 68538039 3 7537689237 .... ... 5000 89457987
table_detail2 id 地址 1 xxxxxxxx 2 xxxxxxxx 3 xxxxxxxx .... .... .... 5000 xxxxxxx
table_detail3 .... .... ..... .... .... table_detail10(几乎相同的结构,每个都有5000多条记录)
我想在 table_header 中创建一个 json 类型的附加字段,其中包含特定用户的所有详细信息。
心有法竹