您好,登录后才能下订单哦!
SELECT
*
FROM
temployee employees0
INNER JOIN tcustomer customer1 ON ( customer1.id = employees0.id );
SELECT
*
FROM
temployee employees0
LEFT OUTER JOIN tcustomer customer1 ON ( customer1.id = employees0.id );
SELECT
*
FROM
temployee employees0
RIGHT OUTER JOIN tcustomer customer1 ON ( customer1.id = employees0.id );
SELECT * FROM t_employee te FULL JOIN t_customer tc ON (te.id = tc.id);
SELECT
*
FROM
temployee employees0
LEFT OUTER JOIN tcustomer customer1 ON ( customer1.id = employees0.id )
WHERE
customer1_.id IS NULL;
SELECT *
FROM
temployee employees0
RIGHT OUTER JOIN tcustomer customer1 ON ( customer1.id = employees0.id )
WHERE
employees0_.id IS NULL;
SELECT *
FROM
t_employee te
FULL JOIN t_customer tc ON ( te.id = tc.id )
WHERE
te.id IS NULL
OR tc.id IS NULL;
Employee
Customer
-- ----------------------------
-- Table structure for t_employee
-- ----------------------------
DROP TABLE IF EXISTS `t_employee`;
CREATE TABLE `t_employee` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`employee_name` varchar(255) DEFAULT NULL,
`employee_part` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- ----------------------------
-- Records of t_employee
-- ----------------------------
INSERT INTO `t_employee` VALUES (1, '老潘', '总裁部');
INSERT INTO `t_employee` VALUES (2, '老王', '秘书部');
INSERT INTO `t_employee` VALUES (3, '老张', '设计部');
INSERT INTO `t_employee` VALUES (4, '老李', '运营部');
-- ----------------------------
-- Table structure for t_customer
-- ----------------------------
DROP TABLE IF EXISTS `t_customer`;
CREATE TABLE `t_customer` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`customer_name` varchar(255) DEFAULT NULL,
`customer_part` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- ----------------------------
-- Records of t_customer
-- ----------------------------
INSERT INTO `t_customer` VALUES (2, '老王', '秘书部');
INSERT INTO `t_customer` VALUES (3, '老张', '设计部');
INSERT INTO `t_customer` VALUES (4, '老刘', '人事部');
INSERT INTO `t_customer` VALUES (5, '老黄', '生产部');
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。