如何查询到树中所有的终结点(在数据库中)(50)

  • 主题发起人 Sdelphi_fu
  • 开始时间
S

Sdelphi_fu

Unregistered / Unconfirmed
GUEST, unregistred user!
如题:表结构:Code ,Name,ParentID 100 xxx 0 001 www 100 00101 ttt 001 00102 aaa 001 0010101 BBB 00101 002 eee 100 00201 vvv 002 ...
 
Select * From ... Where Code not in (Select Distinct ParentID From ...)
 
哈哈,你太有才了,结了.
 
顶部