I've got 2 tables, table A lists all categories and the second table lists all books (name, category). Now, I'm using the following statement to view the number of books per category:<br>
<br>
SELECT category, COUNT(category) FROM books GROUP BY category<br>
<br>
Although this ignores all categories without any books, it works great and is very fast. <br>
But I can't seem to update a column 'entries' in the categories table to the number of books per category. How do I do that? One statement? Thanks a lot in advance!<br>
<br>
<br>
SELECT category, COUNT(category) FROM books GROUP BY category<br>
<br>
Although this ignores all categories without any books, it works great and is very fast. <br>
But I can't seem to update a column 'entries' in the categories table to the number of books per category. How do I do that? One statement? Thanks a lot in advance!<br>
<br>