Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lighter Count Child-Parent?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01382205
Message ID:
01382218
Views:
30
No, just use INNER JOIN.

>In that example I don't care about the parents without children, but I guess the lighter way to do that is to add the having clause like:
>
>
>Select count(tablechild.someid) as itemcount, tableparent.description ;
>	from tableparent ;
		join tablechild ;
>			on tablechild.someid = tableparent.someid ;
>	group by tableparent.someid,tableparent.description
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform