SQL合并两个表的数据
SQL 合并两个表的数据
1.通过共同的field value
display the first name and last name of employees working for the department which allotment amount is more than 50000. lf join?
SELECT emp_fname,emp_lname
开车可以喝红牛吗FROM emp_details e1,emp_department e2 #combine two tables together
培训内容怎么写p_dept=e2.dpt_code
AND dpt_allotment >50000;;
2.joins
SELECT emp_fname, emp_lname
FROM emp_details as e1
春耕备耕
INNER JOIN emp_department as e2
p_dept=e2.dpt_code
WHERE dpt_allotment > 50000;
潮州粉粿3.subquery
SELECT emp_fname, emp_lname小蜜糖
李定国
FROM emp_details
WHERE emp_dept IN
元宵制作(SELECT dpt_code
FROM emp_department
WHERE dpt_allotment > 50000);
4.UNION,UNION ALL
combine column data
监控布线similar skema