SQL RIGHT OUTER JOIN statement

时间:2017-04-10 00:56:29

标签: mysql

I have an entry level SQL problem I'm working on but the question is confusing.. and I'm not sure I have all of the code correct.

The directions are:

Use the blog database Write a SQL RIGHT OUTER JOIN statement that joins the user_id column from the blog.posts table, the name column of the blog.users table and the body column of the blog.posts table together.

The code I have so far is:

USE blog;
SELECT posts.user_id, users.name, posts.body
FROM blog
RIGHT OUTER JOIN user_id ON
blog.name = posts.id;

I feel like I'm missing something in the last part of the code or in the join portion of the code.. Any tips or direction on this question would be amazing. Thank you.

0 个答案:

没有答案
相关问题