问题描述
我有一张表regi
表中的文件是
--- | - ---------- | ---------------- |
id | sponserid |姓名|职位
---- | ----------- | --------- | ----- |
1 | ----- | mahi | ----
2 | mahi | sai | left
3 | mahi | vani |右
4 | sai | vanu | left
5 | sai | ratnam | right
-------------------------
如何让孩子特别是父母
i have a table regi
in that table fileds are
--- |-----------|---------------- |
id |sponserid | name |position
----|-----------|---------|----- |
1 | ----- | mahi |----
2 | mahi | sai |left
3 | mahi | vani |right
4 | sai | vanu |left
5 | sai | ratnam |right
-------------------------
how can i get childs in particular parent
推荐答案
SELECT name AS Child
FROM regi
WHERE sponserid=@SponserId
示例:
Example:
SELECT name AS Child
FROM regi
WHERE sponserid='mahi'
输出:
儿童
........
sai
vani
查看这个sql教程 -
[]
希望,它有帮助:)
Output:
Child
........
sai
vani
Check this sql tutorial -
SQL WHERE Clause[^]
Hope, it helps :)
这篇关于我怎样才能让特别是父母的孩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!