Database Reference
In-Depth Information
FigureĀ 9-2:
Using the Distinct keyword to validate uniqueness.
Selecting Top records
Use the
Top
expression in the
Select
statement (or other data manipulation statements) to allow
you to restrict the result set to a number or percent of rows.
This SQL statement returns the top 10 records in the
DimAccount
table:
Select Top 10 AccountType
From dbo.DimAccount
This SQL statement returns the top 10 percent of records in the
DimAccount
table:
Select Top 10 Percent AccountType
From dbo.DimAccount
Search WWH ::
Custom Search