I'm a newbie in C#.

I produced a nearby database in VS2010(.sdf file). I'm attempting to create some evaluations between database posts. I effectively associated with the database while using connectionstring below:

 string connectionString = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;data source=c:\\users\\user\\documents\\visual studio 2010\\Projects\\myapp\\myapp\\mydb.sdf";

My database has two tables. Nicknames and Names. Nicknames has one area known as "Alias" which simply lists the nicknames saved. Names has one area known as "Text" which simply lists what they are called saved.

Ex:

Alias

Masher
Jones
Jaime
John
Joker

Names

John
Adam
Matt
Jones

Let us say fundamental essentials values during my database. Things I want is to locate the nicknames who aren't within the table of Names that is -> Masher, Jaime and Joker during my example.

Wouldso would i actually do that? I'm using C# and VS2010.

Here's what i attempted when it comes to SQL codes:

 "SELECT Alias FROM nicknames WHERE (NOT (Alias IN(SELECT Text FROM Names))) ";
         "SELECT Alias FROM nicknames EXCEPT SELECT Text FROM Names";
         "SELECT Alias FROM nicknames t LEFT JOIN Names m ON m.Text = t.Alias WHERE m.Text IS NULL";
         "SELECT Alias FROM nicknames UNION SELECT Text FROM Names";

What must i do?

EDIT

 OleDbConnection conn = new OleDbConnection(connectionString);
        conn.Open();
 string sql = "MYQUERYFROMTHEABOVEEXAMPLE";
 OleDbCommand cmd = new OleDbCommand(sql, conn);
             OleDbDataReader reader;
             reader = cmd.ExecuteReader();
             string result = "";
             while (reader.Read())
            {
            result += reader.GetString(0) + "\n";
  }  

This is exactly what i personally use to see the outcomes.

Try:

SELECT Alias FROM nicknames WHERE Alias not in (SELECT Text FROM Names)

Edit: Do this rather:

select a.Alias
from nicknames a left outer join Names n on a.alias = n.text 
where n.text IS NULL

My attempt @ your code (Disregard the fact I personally use SQL syntax as that is what Sometimes with):

enter image description here

Select [Alias] from [nicknames] where [Alias] not in (select [text] from [names])

must do exactly what you would like.