Q&A

Q1:Can SQL be used to retrieve data from multiple database tables?
A1: Yes. Although in this book we will only be studying examples that involve a single database table, database tables commonly share relationships. For example, imagine that we were working on a Web site for an e-commerce site, like Amazon.com. There might be a database table called Orders, which would contain a row for each order. Each order, of course, could have one or more items. Therefore, we might also have a table called OrderItems, which would contain a row for each item placed in each order.

These two tables obviously share a relationship with one another. Each row in the OrderItems table “belongs” to a particular row in the Orders table. This relationship can be ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.