作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
请您帮忙看看问题出在哪里。
MYSQL
Select NameList_name from NameList where NameList.id In
(Select NameList.id from NameList where id_company =
(Select company.id From company where company_company Like "XY"))
And
(Select id_NameList from NameListGoods where id_NameListGoodsKind =
(Select NameListGoodsKind.id from NameListGoodsKind where NameListGoodsKind_NameListGoodsKind LIKE "XX"))
And
(Select id_NameList from NameListStateFrom where id_StateFrom =
(Select StateFrom.id from StateFrom where StateFrom_state Like "XXX"))
And
(Select id_NameList from NameListStateTo where id_StateTo =
( Select StateTo.id from StateTo where StateTo_state Like "XYX"));
这返回了“”SQL Server 子查询返回了超过 1 个值“”强文本我想搜索:从 NameList 中选择 NameList_name,其中 NameList.id正确的 NameList.id 渗透率从其他子查询返回什么。
示例:
表格名单:
ID Name
1 a
2 b
3 c
4 d
5 e
子查询1:
(Select NameList.id from NameList where id_company =
(Select company.id From company where company_company Like "XY"))
返回给我:数字:1,4,5
子查询2:
(Select id_NameList from NameListGoods where id_NameListGoodsKind =
(Select NameListGoodsKind.id from NameListGoodsKind where NameListGoodsKind_NameListGoodsKind LIKE "XX"))
返回给我:数字 2,4,3
子查询3:
(Select id_NameList from NameListStateFrom where id_StateFrom =
(Select StateFrom.id from StateFrom where StateFrom_state Like "XXX"))
返回给我:数字 3,4,1
子查询4:
(Select id_NameList from NameListStateTo where id_StateTo =
(Select StateTo.id from StateTo where StateTo_state Like "XYX"));
返回给我:数字 5,4,2,1
头部查询
此结果的外显率为 4。然后我需要向我显示 Namelist 中的名称,其中 Namelist.id=4;
感谢帮助,
最佳答案
SELECT a.id
FROM (SUBQUERY 1) a
JOIN (SUBQUERY 2) b
ON b.id = a.id
JOIN (SUBQUERY 3) c
ON c.id = a.id
JOIN (SUBQUERY 4) d
ON d.id = a.id;
关于更多子查询的 MYSQL 渗透率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40284911/
对于以下多子脚本: multi sub Screen_get_valid_string($prompt, $accept_empty_string, $max_length = 999) { retu
我正在开发 open-source, cross-platform具有统计支持的番茄计时器。 对于任务,我有一个像这样的树数据结构: class Task { String name;
我是一名优秀的程序员,十分优秀!