O'Reilly logo

Beginning Transact-SQL with SQL Server 2000 and 2005 by Dan Wood, Paul Turley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5

Data Retrieval

In Chapter 4 you learned that as the SQL language has evolved, its capabilities have expanded to add more capabilities. In the next two chapters you learn the fundamentals of DML. This chapter introduces the essentials of data retrieval, and Chapter 6 covers data storage and manipulation. Subsequent chapters build on these concepts as you learn about more advanced implementations of these DML components.

Storage and Retrieval

I'm not a particularly organized person by nature. When I am done using an item, my first impulse is to toss it on my dresser or a table. The workbench in my garage hasn't seen the light of day for several months. I tell you this so you can understand my deep appreciation for the orderliness of a relational database. Perhaps this is the element in my life that helps me compensate for the lack of order in other areas. I also love containers of all kinds. The cool thing about having containers is that when you need to put something away, there's always a place for it, but when it comes time to find it, that's often another story.

Retrieving data through queries is really about finding stuff. SQL queries are used to reach into the database and pull out useful information; sometimes you need to get all of the details and sometimes you need only a subset of data based on common characteristics. At times, the value or values you'll want to return are an aggregation of data that tell you something about the data, rather than just returning all of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required