gpt4 book ai didi

mysql - 如何将两个表合并为一个带有表源的新字段?

转载 作者:太空宇宙 更新时间:2023-11-03 10:46:54 26 4
gpt4 key购买 nike

<分区>

table one
+-----+--------+--------+
|date |index |idOne |
|-----+--------|--------+
| | | |

table two
+-----+--------+--------+
|date | index | idTwo |
|-----+--------|--------+
| | | |


query result where index = "5"

+---------+--------+--------+----------+
|date | index | id | idType |
|---------+--------|--------+----------+
|10/10/91 | 5 | 1 | One |
|10/11/91 | 5 | 2 | One |
|10/12/91 | 5 | 1 | Two |

这些是相关的问题但不一样:

这个没有不同的字段
I want to combine/union two tables and have it create a field that identifies which table it came from

这个没有表区分字段
Combine two tables that have no common fields

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com