# Chapter 3
Querying a Database

This chapter describes how to retrieve data from a database, work with query data, and enable debugging in ColdFusion applications. You will learn how to use the ColdFusion Administrator to set up a data source and enable debugging, use the CFQUERY tag to query a data source, and use the CFOUTPUT tag to output the query results to a Web page.

### Contents

- Publishing Dynamic Data
- Database Basics
- Understanding Data Sources
- Adding Data Sources
- Retrieving Data
- Writing SQL
- Building Queries
- Outputting Query Data
- Getting Information About Query Results