Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SQL I need help with the following question. Thank you Consider the table struct

ID: 3705839 • Letter: S

Question

SQL

I need help with the following question. Thank you

Consider the table structure shown in the figure TERMS Columns Data lConstraints Grants IStatistics ITriggers Flashback IDependendes Details Partitions Indexes Isqu ? ????, Actions NULLABLE DATA DEFAULT COLLMN IDCONMENTS 1 (null) 2 (null) 3 (null) COLUMN NAME DATA TYPE TERMS ID No TERMS DESCRIPTION VARCHAR2 (50 BYTE) No No (null) (null) (null) NUMBER 3 TERMS DUE DAYS NUMBER (a) Write an Oracle-compatible SQL command to create a stored procedure that lets a user add a new roiw to the terms table. Name the procedure whatever you want The procedure will need three input parameters, one for each column of the table (b) Write a statement that calls the stored procedure and that passes it three appropriate values. T T T ? Paragraph ? Arial

Explanation / Answer

Q1.

CREATE OR REPLACE PROCEDURE insert_new_TERMS (pTERMS_ID number,

pTERMS_DESCRIPTION VARCHAR2,

pTERMS_DUE_DAYS number ) AS

BEGIN

-- add a record to the insert_new_TERMS table.

INSERT INTO insert_new_TERMS ([TERMS ID], [TERMS DESCRIPTION], [TERMS DUE DAYS])

VALUES (pTERMS_ID , pTERMS_DESCRIPTION, pTERMS_DUE_DAYS );

END insert_new_TERMS ;

Q2.

Below syntax is used to execute the query

begin

insert_new_TERMS(1,'Terms desc ex',2)

end;