Results 1 to 5 of 5

Thread: SQL query

  1. #1
    Contributing Member
    Join Date
    Apr 2007
    Answers
    41

    SQL query

    Hi all,

    I am beginner to SQL.
    Please can anyone provide me the query which returns rows with same value.
    For ex:
    I have 2 table emp and address.

    emp table has employee name and employee id
    Address table has empid and address..

    Address may be same for more than one employee..

    I need those employees whose address are same??

    thanks in advance
    with regards
    Prakash


  2. #2
    Junior Member
    Join Date
    Jul 2008
    Answers
    1

    Re: SQL query

    What parameters do you look at to determine if a query is performing properly


  3. #3
    Contributing Member
    Join Date
    Apr 2007
    Answers
    41

    Re: SQL query

    Emp name,emp id and address of all who have same address

    thanks


  4. #4
    Contributing Member
    Join Date
    Sep 2007
    Answers
    35

    Re: SQL query

    hi
    The below query will help for u

    select x.* from (select a.employee_id,a.employee_name,b.address, from emp a,address b where a.employee_id=b.employee_id) x
    where x.address in(select distinct address from address)


  5. #5
    Junior Member
    Join Date
    Mar 2008
    Answers
    3

    Re: SQL query

    are you asking for a minimum of two employees having the same address?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact