Results 1 to 4 of 4

Thread: How to combine 3 result rows in mysql

  1. #1
    Join Date
    Jan 2009
    Posts
    21

    How to combine 3 result rows in mysql

    Hi

    I am learning MySQL in that i want to combine 3 result rows is anyone know how to do that. Can anyone provide me query that i will use in SQL .


    Thanks

  2. #2
    Join Date
    Oct 2008
    Posts
    29

    Re: How to combine 3 result rows in mysql

    Can you provide us table information. so we will come to know what exactly you want.

  3. #3
    Join Date
    Jan 2009
    Posts
    21

    Re: How to combine 3 result rows in mysql

    Here is table which i want to join

    Table 1: Student
    Student_id int
    Student_name varchar
    -other fields

    Table 2: Student_profiles
    Student_profiles_id int
    Student_id int
    sub_name int


    Table 3: Course
    Course_id int
    Student_id int
    sub_name int

  4. #4
    Join Date
    Oct 2008
    Posts
    29

    Re: How to combine 3 result rows in mysql

    Try this query :

    SELECT DISTINCT s.student_id, s.student_name
    FROM student s
    JOIN student_profiles up
    ON s.student_id = sp.student_id
    JOIN student_matches_profiles ump
    ON sc.sub_name int = sc.sub_name int AND
    ump.answer_id = up.answer_id

Similar Threads

  1. How to match MySQL result from keywords?
    By Utpalini in forum Windows Software
    Replies: 5
    Last Post: 30-08-2011, 09:28 AM
  2. How to combine data in duplicate rows in MS excel
    By Virginia in forum Windows Software
    Replies: 7
    Last Post: 10-07-2011, 11:13 AM
  3. Replies: 3
    Last Post: 07-11-2009, 09:36 PM
  4. How to edit rows in MySQL
    By DeMario in forum Software Development
    Replies: 4
    Last Post: 05-11-2009, 08:50 PM
  5. supplied argument is not a valid mysql result resource, help
    By Dr.pter in forum Software Development
    Replies: 3
    Last Post: 14-04-2009, 08:16 AM

Tags for this Thread

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
  •  
Page generated in 1,714,052,430.85107 seconds with 16 queries