avatar
nested SQL help!# Database - 数据库
h*r
1
can I use only one SQl sentence to select an item from
multiple table?
like,
select item1 from /* here should be another SQL sentence to
get
all tablename I want to search item1 */
where item1 like 'something';
or at lease can be:
select item1 from Tab1, Tab2 where item1 like 'something".
Thanks a lot for help.
avatar
p*e
2
sure.
example:
select v1.a, v1.b, v2.e, v2.f from
(select t1.a, t2.b from t1 inner join t2 on t1.c=t2.c) v1
inner join
(select t3.e, t4.f from t3 inner join t4 on t3.c=t4.c) v2
where v1.a = 'abcd' and v2.f='xyz'

【在 h****r 的大作中提到】
: can I use only one SQl sentence to select an item from
: multiple table?
: like,
: select item1 from /* here should be another SQL sentence to
: get
: all tablename I want to search item1 */
: where item1 like 'something';
: or at lease can be:
: select item1 from Tab1, Tab2 where item1 like 'something".
: Thanks a lot for help.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。