a query to join two table column in 1 mysql code example
Example 1: mysql join two tables
SELECT user_id, user_name
FROM users
UNION
SELECT organization_id, organization_name
FROM organizations
Example 2: how to join more then 2 column in mysql
SELECT
s.last_name, s.first_name,
p.course_code, p.status, p.amount
FROM enrollment e
JOIN student s
ON s.id=e.student_id
JOIN payment p
ON p.course_code=e.course_code
AND p.student_id=e.student_id;