Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need an Oracle SQL trigger that creates an audit when data is added to BB_PRODUCT and adds it to the BB_PRODUCTCHG_LOG table. BB_PRODUCTCHG_LOG table

I need an Oracle SQL trigger that creates an audit when data is added to BB_PRODUCT and adds it to the BB_PRODUCTCHG_LOG table.

BB_PRODUCTCHG_LOG table structure:

CREATE TABLE BB_PRODUCTCHG_LOG

(

USER_ID VARCHAR2 (50),

CHG_DATE DATE,

PRODUCTNAME_OLD VARCHAR2 (25),

PRODUCTNAME_NEW VARCHAR2 (25),

PRICE_OLD NUMBER (5, 2),

PRICE_NEW NUMBER (5, 2),

SALESTART_OLD DATE,

SALESTART_NEW DATE,

SALEEND_OLD DATE,

SALEEND_NEW DATE,

SALEPRICE_OLD NUMBER (5, 2),

SALEPRICE_NEW NUMBER (5, 2)

);

The structure for the BB_PRODUCT table is the screenshot, thanks in advance!

image
CoursHeroTranscribedText

BB_PRODUCT IDPRODUCT PRODUCTNAME DESCRIPTION PRODUCTIMAGE PRICE SALESTART SALEEND SALEPRICE ACTIVE FEATURED FEATURESTART FEATUREEND TYPE IDDEPARTMENT STOCK ORDERED REORDER

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What purpose does a bank reconciliation serve?

Answered: 1 week ago

Question

Why should goals be specific and measurable?

Answered: 1 week ago

Question

How can splitting a table improve performance?

Answered: 1 week ago

Question

Describe the purpose of the PROJECT command in relational algebra.

Answered: 1 week ago

Question

1. there was equal status between the groups in the situation;

Answered: 1 week ago

Question

3. the situation required cooperation;

Answered: 1 week ago