Querying DataAs

As a database developer, you need to regularly retrieve data for various purposes, such as creating reports and manipulating data. You can retrieve data from the database server by using SQL queries. This chapter explains how to retrieve selected data from database tables by executing the SQL queries. Further, it discusses how to incorporate functions to customize the data values returned by the queries. In addition, the chapter explains how to retrieve summarized and grouped data from the database tables | Querying Data Chapter 2 As a database developer you need to regularly retrieve data for various purposes such as creating reports and manipulating data. You can retrieve data from the database server by using SQL queries. This chapter explains how to retrieve selected data from database tables by executing the SQL queries. Further it discusses how to incorporate functions to customize the data values returned by the queries. In addition the chapter explains how to retrieve summarized and grouped data from the database tables. Objectives In this chapter you will learn to fl Retrieve data fl Use functions to customize the result set fl Summarize and group data Retrieving Data At times the database developers might need to retrieve complete or selected data from a table. Depending on the requirements you might need to extract only selected columns or rows from a table. Consider the example of an organization that stores the employee data in SQL Server database. At times the users might need to extract only selected information such as name date of birth and address details of all the employees. At other times the users might need to retrieve all the details of the employees in the Sales and Marketing department. Depending on these requirements you will need to run different SQL queries. These queries specify the criteria for selection of data from the tables. Therefore it is important for you to learn how to query databases to retrieve the required information. Databases can contain different types of data. Therefore before querying the data it is important to identify the various types of data. Identifying Data Types Data type specifies the type of data that an object can contain such as character data or integer data. SQL Server 2005 supports data of various data types. You can associate a data type with each column local variable expression or parameter defined in the database. You need to specify the data type according to the data to be stored. For example you .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
50    110    5    15-05-2024
8    77    1    15-05-2024
2    65    2    15-05-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.