SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 81 | Next

Scott Klein

"Professional LINQ"

For instance, a simple
query looks like this:
SELECT FirstName, LastName
FROM Person.Contact
This example queries the Person.Contact table in the AdventureWorks database and returns the First-
Name and LastName columns for each row in the table. Too simple really, so the following adds
a secondary table, applies a filter, and applies a sort:
SELECT E.EmployeeID,C.FirstName, C.LastName
FROM Person.Contact AS C
INNER JOIN HoumanResources.Employee AS E ON C.ContactID = E.ContactID
WHERE E.EmployeeID < 100
ORDER BY C.LastName
This is the syntax with which all T-SQL developers are familiar. At the very minimum the query begins
with a SELECT clause, which specifies the columns you want to be returned by the query, followed by a
FROM clause, which lists the tables and/or views containing the columns identified in the SELECT clause.
The query could include one or more joins such as an INNER JOIN or OUTER JOIN, followed by some filtering
using the WHERE clause and possibly a GROUP BY or HAVING clause, and quite possibly some ordering
using the ORDER BY clause.


Pages:
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6