sql - 单列递归查询输出
问题描述
任何人都可以根据下面的表格数据帮助我解决下面的查询输出。
模式:AVRA1 与 979798 链接。现在在 979798 我们有(AVRA1,SHUBH2,MOM)。现在 SHUBH2 链接到 979798,979799。现在我需要检查 979799 并找出链接的 col2 等等。
表A
col1 col2
979798 avra1
979798 shubh2
979798 mom
979798 shubh2
979799 shubh2
979799 papa
979799 papa
979800 papa
979800 neha
1 abc
2 xyz
3 asd
4 fgv
5 jug
6 iuy
7 oij
输入
AVRA1
输出
col1 col2
979798 avra1
979798 shubh2
979798 mom
979799 shubh2
979799 papa
979800 papa
979800 neha
解决方案
推荐阅读
- c# - 如何在 GridView C# asp.net 中显示 JavaScript 确认对话框并运行函数?
- beautifulsoup - Beautifulsoup 代码中的 getchildren() 到 LXML
- java - java - 如何在java中使用split制作二维数组列表?
- python - Python - 遍历行和列
- c# - 在控制台中使用 csc 构建 C# 项目 - 在所有类上出现两个错误
- .net - 无法安装 Umbraco Headless .Net 客户端
- algorithm - 一个包含 100 万个整数的大文件,找到最常出现的整数的最快方法是什么?
- unit-testing - 使用 Spock 测试如何验证 json 属性键值对作为动态输入
- python - CPython:为什么一个 3 行脚本在解释器中需要远远超过 3 个周期才能执行?
- extjs4 - IE上的Extjs 4面板列宽问题