sql server - SQL: Join Parent - Child tables -


I am creating a simple review website application and need some help with SQL queries.

There are 3 tables (subject, comments, user) I need SQL query to select data from all 3 tables.

The 'Topics' table is the parent and the 'Notes' table contains the Child records (From zero to 100 records per parent. / P>

Third table 'User' in all Users have user information.

Here are the fields for the 3 tables:

  theme (topic id, user (user id, username)   

I tried:

 Select from  topics include internal inner. Click Topics.topicID = Comments TopicID Inner Topics.userID = Join Users at Users.userID   

But it does not work correctly because there are many topics and user information Any help that is not included will be appreciated.

Skip with comment to get the topic Should not give any comments as well as join the topic and provide related user information for both. Comment with users to Rapt. select T Inner user to online Tiukyusraidi = Tikyusraidiaiaifaidiaidiaidiaidiaidiaidiaidiaidiaidi =

Comments