ITeye博客

依条件查询本身记录和第一层子记录

dywjavaeyw · 2011-04-22 15:02 · SQL语句 · 数据库 · Markdown

第一种方法:


eg:
int a[] = new int[]{1,2};
select * from tepd.functions where functionsid in (a) or topfuncid in (a)

第二种:


int b =6;
select * from tepd.functions a where a.functionsid=b union select * from tepd.functions b  where b.topfuncid=b

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。