Skip to content

cibofdevs/mybatis-sql-join

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Complete Guide to SQL Join Using MyBatis and Spring Boot

Create Employee and Department Tables:

CREATE TABLE Employee (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL,
    department_id INT
);

CREATE TABLE Department (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL
);

Insert sample data:

INSERT INTO Employee (name, department_id) VALUES 
('John Doe', 1), 
('Jane Smith', 2),
('Michael Johnson', NULL),
('Emily Davis', 3),
('William Brown', 1);

INSERT INTO Department (name) VALUES 
('HR'), 
('Finance'), 
('IT');

Article Link: https://medium.com/@cibofdevs/complete-guide-to-sql-join-using-mybatis-and-spring-boot-e9cbc28fe8a3

About

๐Ÿ“– Complete Guide to SQL Join Using MyBatis and Spring Boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages