ข้ามไปยังเนื้อหา
การเชื่อมสองตาราง

To use data from both tables at once, you join them. An INNER JOIN pairs up rows that match on a key — here, the order's customer_id with the customer's id:

SELECT customer.name, orders.total
FROM customer
INNER JOIN orders ON customer.id = orders.customer_id;

เมื่อชื่อบริการสามารถมาจากตารางใดก็ได้ ให้เขียน table.column เพื่อให้ชัดเจน

INNER JOIN รวมรายงานwhose ค่าคีย์ตรงกัน

เอกสารประกอบการเรียน

เข้าสู่ระบบหรือสร้างบัญชี

IGCSE, A-Level & AP