The Where clause is used as a filter for the Select statement…

Use AdventureWorks2016CTP3

Select

FirstName

,MiddleName

,LastName

From

[Person].[Person]

Where

FirstName = ‘Kim’

FirstName        MiddleName        LastName

Kim        NULL        Abercrombie

Kim        NULL        Abercrombie

Kim        B        Abercrombie

Kim        NULL        Akers

Kim        NULL        Akers

Kim        NULL        Akers

After the Where, an Order By can be used to sort the results…

And this can be Asc for Ascending, or Desc for Descending.

Use AdventureWorks2016CTP3

Select

FirstName

,MiddleName

,LastName

From

[Person].[Person]

Where

FirstName = ‘Kim’

Order

By LastName Desc

FirstName        MiddleName        LastName

Kim        T        Ralls

Kim        NULL        Ralls

Kim        NULL        Ralls

Kim        NULL        Ralls

Kim        NULL        Akers

Kim        NULL        Akers

Kim        NULL        Akers