Question: Write a Stored Procedure for the MySQL homework database called DeansListParam that accepts a floating-point number as a parameter and returns all the student names

Write a Stored Procedure for the MySQL homework database called DeansListParam that accepts a floating-point number as a parameter and returns all the student names and GPA with a grade point average that is equal to or greater than the IN parameter. Do not use dollar signs as temporary delimiters.

homework database:

create table dept

(

    deptName varchar(25) not null

        primary key,

    numPhDs  decimal(3) default 0

);

 

create table course

(

    cno        decimal(9)  not null,

    courseName varchar(50) default NULL,

    deptName   varchar(25) not null

        references dept,

    primary key (cno, deptName)

);

 

create table prof

(

    profName varchar(30) not null

        primary key,

    deptName varchar(25) default NULL

        references dept

);

 

create table section

(

    deptName varchar(25) not null

        references dept,

    cno      decimal(9)  not null

        references course (cno),

    sectno   decimal(3)  not null,

    profName varchar(30) default NULL

        references prof,

    primary key (deptName, cno, sectno)

);

 

create table student

(

    sid         decimal(9) not null

        primary key,

    studentName varchar(30)   default NULL,

    gpa         decimal(3, 2) default NULL

);

 

create table enroll

(

    sid      decimal(9)  not null

        references student,

    grade    decimal(3, 2) default NULL,

    deptName varchar(25) not null,

    cno      decimal(9)  not null,

    sectno   decimal(3)  not null,

    primary key (sid, deptName, cno, sectno),

    foreign key (deptName, cno, sectno) references section

);

 

create table major

(

    deptName varchar(25) not null

        references dept,

    sid      decimal(9)  not null

        references student,

    primary key (deptName, sid)

);

 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Answers Stored Procedure DELIMITER create PROCEDURE DeansListParamgpatemp decimal BEGIN SELECT s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!