Results 1 to 3 of 3

Thread: how to arrange by joining tables

  1. #1
    Join Date
    Sep 2008
    Posts
    1

    Exclamation how to arrange by joining tables

    i got a problem in executing the two different tables ...
    for eg take those two tables given in the tutorial
    http://sqlcourse2.com/joins.html

    i want to display the complete table with firstname lastname, ordered_date, items, price etc in ascending order of names ie. firstname...
    but when i do that i only list out differently...
    please guide....

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    What does your code look like?

  3. #3
    Join Date
    Jul 2008
    Location
    Belgium
    Posts
    17
    You must use order by
    More information see http://sqlcourse2.com/orderby.html

    Example:

    SELECT *
    FROM customer_info
    INNER JOIN purchases
    ON customer_info.customer_number = purchases.customer_number
    ORDER BY customer_info.firstname, customer_info.lastname;

Posting Permissions

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