Answer the question
In order to leave comments, you need to log in
How to set a default value for a column in a table?
I have three tables: Book(Id), Topic(Id), BookTopic(BookId, TopicId). There is a query that for each Topic returns the number of Books in this Topic:
SELECT T.Id, T.TopicName, count(BT.TopicId) AS 'BooksCount'
FROM Topic T, BookTopic BT
WHERE T.Id = BT.TopicId
GROUP BY T.Id, T.TopicName
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question