whats the solution for this mind bender

Discussion in 'Databases' started by mumfry, Jun 6, 2010.

  1. #1
    hey guys
    if i am working with two different tables, table 1 has a list of names and table 2 also has a list of names .
    What i would like to know is what query can i use to count the number of names from table 1 that are the same with table 2.
    i came up with this query

    select count(*) from table 1 where name=name

    but as you can see i have only selected 1 table .how do i check table 1 against table 2.
     
    mumfry, Jun 6, 2010 IP
  2. Layoutzzz

    Layoutzzz Greenhorn

    Messages:
    78
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Hi,

    Please try following query
    I hope it will help you
     
    Layoutzzz, Jun 7, 2010 IP