Re: How to count rows in a sub-table
From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 05/18/04
- Next message: Sreedhar Kaluva: "setupsql.exe hangs. Cannot Install SQL server 2K"
- Previous message: Q: "Re: Grant Execute right to the group of users"
- In reply to: Leo Violette: "How to count rows in a sub-table"
- Next in thread: Leo Violette: "Re: How to count rows in a sub-table"
- Reply: Leo Violette: "Re: How to count rows in a sub-table"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 May 2004 06:47:11 +0530
use left outer join
Ex:
select books.BookName, Count(orders.bookid) as TotalSold
from Books left outer Join Orders on Orders.BookID = Books.BookID
group by books.BookName
order by books.BookName
--
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com
- Next message: Sreedhar Kaluva: "setupsql.exe hangs. Cannot Install SQL server 2K"
- Previous message: Q: "Re: Grant Execute right to the group of users"
- In reply to: Leo Violette: "How to count rows in a sub-table"
- Next in thread: Leo Violette: "Re: How to count rows in a sub-table"
- Reply: Leo Violette: "Re: How to count rows in a sub-table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|