23290803_PITSI_ R_assignment2 .pdf

23290803_PITSI_ R_assignment2 .pdf

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
PITSI R 23290803 ASSIGNMENT 2 ITRW 311 SQL PRACTICAL 3/13/2013
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
-- PROCEDURE1 -- -------------------------------------------------------------------------------- -- Routine DDL -- PITSI R 23290803 -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE DEFINER=`u23290803`@`%` PROCEDURE `get_courses_by_lecturer`(IN lecturer_number INT) BEGIN if lecturer_number = -1 then SELECT tinyuniversity.COURSE.CRS_CODE, tinyuniversity.COURSE.CRS_DESCRIPTION, tinyuniversity.COURSE.CRS_CREDIT, tinyuniversity.LECTURER.EMP_NUM, tinyuniversity.LECTURER.LECT_HIGH_DEGREE FROM tinyuniversity.CLASS Inner Join tinyuniversity.COURSE ON tinyuniversity.CLASS.CRS_CODE = tinyuniversity.COURSE.CRS_CODE Inner Join tinyuniversity.LECTURER ON tinyuniversity.CLASS.LECT_NUM = tinyuniversity.LECTURER.EMP_NUM ; else SELECT tinyuniversity.COURSE.CRS_CODE, tinyuniversity.COURSE.CRS_DESCRIPTION, tinyuniversity.COURSE.CRS_CREDIT,
Image of page 2
tinyuniversity.LECTURER.EMP_NUM, tinyuniversity.LECTURER.LECT_HIGH_DEGREE FROM tinyuniversity.CLASS
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern