Online Since 1995

About Frank

LINQ vs SQL Reference Table

LINQ is a great technology and has made me rethink the way I process data in code.

Although similar in many ways to SQL, LINQ's designers changed a few things in translation.

These changes, no matter how justified, still cause a little confusion.

Thankfully, Paul Litwin created this table comparing SQL keywords to LINQ keywords in C# and VB.

 

C# LINQ

VB LINQ

ANSI SQL

from

From

FROM

select

Select

SELECT

where

Where

WHERE

orderby

Order By

ORDER BY

join

Join

JOIN

group

Group By

GROUP BY

Distinct()

Distinct

DISTINCT

into

Into

INTO

let

Let

AS

Count(), Sum(),…

Aggregate

COUNT, SUM,… with no group

Skip()

Skip

n/a

SkipWhile()

Skip While

n/a

Take()

Take

n/a

TakeWhile()

Take While

n/a

 

Technorati Tags: ,,
Add a Comment