Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql - Find all children who are not parent

SELECT ID, ParentID 
FROM [SMD].[dbo].[ProposalFollowUp] t1
WHERE NOT EXISTS
(
   SELECT 1 FROM [SMD].[dbo].[ProposalFollowUp] t2
   WHERE t2.ParentID = t1.ID
)
Source by sqlerrors.com #
 
PREVIOUS NEXT
Tagged: #sql #Find #children #parent
ADD COMMENT
Topic
Name
5+5 =