gpt4 book ai didi

mysql - 如何从表表中检索表记录?

转载 作者:行者123 更新时间:2023-11-30 21:36:23 25 4
gpt4 key购买 nike

<分区>

我想从表中检索表记录下面是我解释清楚的希望你明白

这是我尝试过的方法,但没有得到预期的结果。

表一

----------------------------------------------------------------------------
tables | id
----------------------------------------------------------------------------
test 1
pure 2
root 3
link 4
----------------------------------------------------------------------------

测试表

----------------------------------------------------------------------------
id | name | gender
----------------------------------------------------------------------------
1 jack m
2 dude m
3 crop m
4 pert m
----------------------------------------------------------------------------

我的查询使用表检索测试表

select * from(select tables from table1 where id=1) as info;

结果

----------------------------------------------------------------------------
tables
----------------------------------------------------------------------------
test


----------------------------------------------------------------------------

预期输出

----------------------------------------------------------------------------
id | name | gender
----------------------------------------------------------------------------
1 jack m
2 dude m
3 crop m
4 pert m
----------------------------------------------------------------------------

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