Answer to Question #217396 in Databases | SQL | Oracle | MS Access for Talha

Question #217396

Question 1

A sequence is a database/schema object used to generate a unique auto-number. The auto-number generated through a sequence is independent of tables, which means that the same number can be used for multiple tables. 


Consider the following table: 

Assignment_No  Course_Code   Total_Marks 

1  CS201  15 

2  CS614  20 

1  CS614  10 

5  CS610  25 

3  CS409  15 

 You are required to write a PL/SQL PROCEDURE named Add that insert a new record in the above table


1
Expert's answer
2021-07-15T05:19:20-0400
CREATE DEFINER=`root`@`localhost` PROCEDURE `Add`(IN `assignNo` INT, IN `course_code` VARCHAR(20), IN `mark` INT)
BEGIN
	INSERT INTO `student`(`Assignment_No`, `Course_Code`, `Total_Marks`) VALUES (assignNo,course_code, mark);


END

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS