Database Reference
In-Depth Information
Chapter 6
Querying Information in
Windows Azure SQL Database
Objectives
Understand how to extract information with SQL
Use SQL to query tables in Windows Azure SQL Database
6.1 Introduction
After a database is populated with data, it is ready to provide the data for various database applica-
tions. Both database administrators and database application developers need to retrieve informa-
tion from databases. For example, when developing a web-based class registration form, a database
application developer needs to make the class information available to the online form. For data-
base administrators, querying information from databases is also a task performed routinely, for
example, querying a log ile to retrieve data to rebuild a table deleted accidentally.
here are several ways of querying information from a database. he most commonly used lan-
guage for querying databases is SQL. In Windows Azure SQL Database, you can also extract infor-
mation from a database using an XML-based query. In this chapter, you will learn how to write
SQL statements to query tables in Windows Azure SQL Database to retrieve useful information.
6.2 Retrieving Data from Tables with SQL
In SQL, getting data stored in a table can be done with a query that consists of three basic parts,
SELECT, FROM, and WHERE, shown in the following format:
SELECT column_name(s)
FROM table_name(s)
WHERE condition(s)
Search WWH ::




Custom Search