SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    data from 2 tables

    hi,
    i have 2 tables,data is stored and i want to retrieve data from 2 tables in a single query, is it possible to achiev it?

    table 1
    id - visit
    1
    2
    3
    .
    3
    2
    3
    .
    .


    -------------------

    table 2
    id - meeting
    1
    2
    3
    4
    1
    2
    3
    4
    .
    .
    .
    ---------------

    tables are just like this, both IDs are having samelike value.
    nowiwant to get the IDS of those 5 persons who have more visits and meeting,but i want in a single query...plz help

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    go to google, enter "SQL tutorial", and read a few of them

    look for join query
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •