Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    5

    Unanswered: join between two table?

    1st of all thanx all who help me in my last qestion.
    am new to data base hence fasing small problems


    can any one tell me how can i create a RESULT TABLE for a join between the module and student table on Number_Enrolled and Number_of_Credits.
    the null represent a null mark


    here two table
    ======
    Module(module_id Module_Code Number_Enrolled)
    ===========
    Student(Student_id Number_of_Credits)
    =============

    many thanx
    Akshay

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down



    You can't, there is no common column to be able to join those tables. You need an additional table that would contain the student and the module_id(s) in which he is enrolled.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    This is what I've read from your post:
    Code:
    CREATE TABLE result_table AS
      SELECT m.module_id, m.module_code, m.number_enrolled, s.student_id
      FROM module m, student s
      WHERE m.number_enrolled = s.number_of_credits;
    But, somehow, I guess that's not what you really want.

  4. #4
    Join Date
    Aug 2006
    Posts
    9
    Tell us your functional requirement, buddy...how do you want your output to look like...

Posting Permissions

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