have 4 errors i am getting on my sequences and my triggers: /*create trigger*/ /*Display when new housing item is added*/ CREATE TRIGGER housing_Trigger AFTER
have 4 errors i am getting on my sequences and my triggers:
/*create trigger*/
/*Display when new housing item is added*/
CREATE TRIGGER housing_Trigger AFTER INSERT ON Housing FOR EACH ROW BEGIN dbms_output.put_line ('A housing item has been added!!'); END;
/*Send email to alert an new spender has been added*/
CREATE TRIGGER new_spender BEFORE INSERT ON spender FOR EACH ROW BEGIN CALL sendmail ('Spender Added') INSERT INTO logtable VALUES ('Spender_id', "firstname". "lastname", "address", "location"); END;
/* Create sequence*/
CREATE SEQUENCE Spender_seq START WITH 1 INCREMENT BY 1; CREATE SEQUENCE Spender1_seq START WITH 0 INCREMENT BY -1;
Error: near line 104: near "dbms_output": syntax error Error: near line 112: near "CALL": syntax error Error: near line 310: near "SEQUENCE": syntax error Error: near line 314: near "SEQUENCE": syntax error
Reference tables:
Create table spender ( Spender_id integer not null, FirstName varchar (30), LastName varchar (30), Address varchar (30), Location varchar (100), Constraint pk_spender_id primary key (spender_id) );
Create table housing ( housing_item varchar (30) not null, Cost varchar (1000), Time varchar (100), Location varchar (100), Quantity integer, Spendernam integer not null, Constraint pk_housing_item primary key (housing_item), Constraint fk_spendernam foreign key (spendernam) references spender (spender_id) );
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started