Results 1 to 2 of 2

Thread: How to read this querry

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    382

    How to read this querry

    select a.lib_book_title,a.lib_book_author_name as Author,b.category_name from lib_book_details a join lib_book_categories b on b.category_id = a.lib_book_category join lib_book_issue_details c on c.lib_book_id = a.lib_book_id where c.lib_book_issued_to = '" + Globals.UserName + "'"

    there is two join operator and i m confuse how to read

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How to read this querry

    It's just getting one record with information from three tables. Let's say that you had a Person table, a Dog table and a Cat table. Such a query would allow you to get a single record containing the name of a person, the name of their dog and the name of their cat. Both the Dog and Cat tables would contain a PersonID column and they would be used to join those two tables with the Person table.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

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



Click Here to Expand Forum to Full Width