Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Suppose you want to query two tables, users and user_posts, and you want to fetch all user names [from users table] with all their posts titles in a single field, is that achievable in a single query? Database engine is ORACLE10g
I think the following is useful for you:
SELECT User.UserId, User.Name, User_Posts.Title FROM User INNER JOIN User_Posts ON (User.UserId = User_Posts.UserId)
You can try the below:
SELECT a.user_name||' '||b.post_title
FROM users a, user_posts b
WHERE a.userid = b.userid