Obtaining data from multiple tables
Why Query Multiple Tables?
Relational databases split data across many tables to avoid duplication (normalization). Retrieving a complete picture — for example, an order along with its customer's name — usually means combining rows from two or more tables in a single query.
How It Works
SQL combines tables using a JOIN, which matches rows from one table to rows in another based on a related column, typically a foreign key referencing a primary key.
SELECT o.order_id, c.customer_name
FROM orders o
JOIN customers c ON o.customer_id = c.customer_id;
Why Testers Need This Skill
Application screens often display data assembled from several tables. Being able to write the equivalent multi-table query lets a tester independently verify that the UI is showing the correct, correctly-joined data.
PreviousString Function , Number Function , Date and Time Function, General Function
Next Types of joins : Inner joins , Non-equi Join, Natural Join, Right outer join
Ready to master real-world software testing?
Learn manual and automation testing hands-on with mentor-led sessions.
.png)