读书人

树形结构SQL解决办法

发布时间: 2012-04-23 13:17:38 作者: rapoo

树形结构SQL

SQL code
A表:org_id    org_name   p_idB表:org_id          user_idC表:user_id     user_nameD表:user_id      user_pic    state

分别根据user_name,org_name, state,三个字段查找user_name,user_pic,org_name结果集


[解决办法]
探讨
引用:

select c.user_name,d.user_pic,a.org_name from A a ,B b,C c,D d where a.org_id =b.org_id and b.user_id

=c.user_id and c.user_id = d.user_id and c.user_name =? and a.org_name = ?
and ……

读书人网 >oracle

热点推荐