Loading ...
Sorry, an error occurred while loading the content.

10651Re: [PkOug] Need Query

Expand Messages
  • Badruddin Hunzai
    Nov 6, 2013
      Dear Tahir,

      It's a very simple query.  You need to join both tables.


      SELECT
      student_reg_no,
      course_id
      FROM
                  Student s,
                  Course c
      WHERE
                  c. student_reg_no=s. student_reg_no;

      Good luck.

      Badar


      On Wednesday, November 6, 2013 4:26 PM, Majid Tahir <tahir.majid@...> wrote:
       
      AOA,
      Dear Members,
      I have following tables

      table student:

      student_name       student_reg_no
      ali                                  1
      tahir                                2

      table course

      student_reg_no            course id
                1                             1
                 1                            2
                 1                            3
      I need a query to represent the course in single coulumns
      like
      student_reg_no                 course id
      1                                         1,2,3

      how can i write this query, kindly help


    • Show all 9 messages in this topic