in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Searching a table

Last post 03-08-2010 4:17 PM by milosevic81. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-14-2009 7:46 AM

    Searching a table

    I dont know if this is considered a text search or not, but this is what I am trying to do.  Can someone help me out on this please.

    Table1: UniqueID
    109921 | Johnny James
    299013 | Steven Adams
    933021 | Bobby Stern

    Table2: UniqueID
    109921 | Best e-book ever.
    299013 | Life in the days of old.
    109921 | Here comes harry.
    109921 | A new sunset.
    933021 | New ABC

    Lets say that I select the user Johnny James from table one, how can I use that UniqueID (109921) and do a complete search in Table2 UniqueID and return only the rows that comtain that UniqueID?

    I am trying to figure this out, but I don't know how to do it.

     Thanks

    Justin
  • 03-08-2010 4:17 PM In reply to

    Re: Searching a table

    select * from table1, table2 where table1.id = table2.id and table1.name = "Johnny James" You should google SQL inner join.
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems