SQL For .NET Programmers by D Bush

SQL For .NET Programmers by D Bush

Author:D Bush [Bush, D]
Language: eng
Format: azw3, mobi, epub
Publisher: DMB Consulting, LLC
Published: 2016-06-26T16:00:00+00:00


Nikhil

Hindi

Nikhil

English

Kisu

Hindi

Kisu

English

Rakesh

Hindi

Kousik

Bangali

How do I select names of persons who know both Hindi and English?

In this table, that query should return Nikhil and Kisu.

Normally, if it were me, I’d create a Language table and a Name table and use an intermediate table to join them. But the solution would still be about the same. So we’ll work with the table we’ve been given. There is, obviously, a Bangali table to be had, but we only want those who speak English and Hindi.

What we need to do here is make this look like it is two tables—The Hindi table and the English table—and do a JOIN between the two:

SELECT [NameLang].[Name]

FROM [NameLang]

INNER JOIN

[NameLang].[Name]

= [NameLang_1].[Name] WHERE

([NameLang].[Language]

= 'English')

AND

([NameLang_1].[Language]

= 'Hindi')



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.