能不能一条sql查询出姓名为‘张三’的以及,superId等于 所有张三的id.

如题所述

select * from 表名 where NAME='张三'
这样找出所有张三了,没懂你后面的意思。。
温馨提示:内容为网友见解,仅供参考
第1个回答  2012-06-01
select * from 表名 where name=“张三” and superId=""
第2个回答  2012-06-02
select * from table where username=‘张三’ and superid=(select id from table where name=‘张三’)
相似回答