Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Çó´Ësql¼ò»¯

SQL code:
select a.nm
from a
where a.op_id=(select a.op_id
from a,b
where a.op_id=b.u_id and b.or_id=(select b.or_id
from b,c
where b.or_id=c.re_id and c.re_id='000022'))

SQL code:
select select a.nm
from a,b,c
where a.op_id=b.u_id
and b.or_id=c.re_id
and c.re_id='000022'


ͬÒâLS

SQL code:
select a.nm
from a,b
where a.op_id=b.u_id and b.or_id='000022'


SQL code:

select a.nm from a,b,c
where a.op_id=b.u_id and b.or_id=c.re_id and c.re_id='000022'

--or
select a.nm from a,b
where a.op_id=b.u_id and b.or_id='000022'




ÒýÓÃ
select select a.nm
from a,b,c
where a.op_id=b.u_id
and  b.or_id=c.re_id
and  c.re_id='000022'

dui

select a.nm,b.nm from a,b
where a.ap_id=b.u_id and a.op_id=b.u_id and  b.o


Ïà¹ØÎÊ´ð£º

Èç¹ûдµÝ¹ésqlÓï¾ä - MS-SQL Server / Ó¦ÓÃʵÀý

ÓÐÁ½¸öͬÑùµÄ±í½á¹¹ 
±í½á¹¹ÈçÏ£º
  id£¨ÐòºÅ£© parentid £¨¸¸½áµãÐòºÅ£© name(½áµãÃû³Æ)
 ±í1 ¼Ç¼ 1 0 aaa
  2 ......

sql ´æ´¢¹ý³Ì

ÎÒÒª×öÒ»¸ö¶¨µãʼþ£¬ÊÇÿÌìÍíÉÏ12µã¾Í°ÑÈý¸ö±íÀïµÄÐÅÏ¢·ÅÈëÒ»¸ö±íÀÎÒÏëÓô洢¹ý³ÌÀ´Ð´£¬ÔõÃ´Ð´ÄØ£¿£¬ÄÇλ¸ßÊÖ°ï°ïæ°É£¬·Ç³£¸Ðл£¡

Óû§ÃûÊÇΨһµÄ
±íA  ×Ö¶Î
Óû§Ãû£ºName  ,ÓÊÏ䣺Ema ......

ÇóÒ»¸öSQLµÃ²éѯÓï¾ä

ÒÑÖªÒ»¸ö¹©Ó¦Çé¿ö±í SPJ
ÓÐÊôÐÔ ¹©Ó¦É̺ÅÂë SNO
  Áã¼þºÅÂë PNO
  ¹¤³ÌÏîÄ¿ºÅÂë JNO
  Áã¼þÊýÁ¿ QTY
ÇóÂú×ãÏÂÃæÒªÇóµÄ¹©Ó¦É̺ÅÂ룬¸Ã¹©Ó¦É̹©Ó¦¸øÄ³¸ö¹¤³ÌÁã¼þP1 µÄÊýÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ