i have added for price <150 ADD CONSTRAINT cost_price_ck CHECK (price < 150); DECLARE price BEGIN insert into orders values (430 k street',books,225); when (price > 150); dbms_output.put_line('too expensive '); END; i want to do is ,when price is over 150 ,will show too expensive but i run this code, it show like this PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following: constant exception table long double ref char time timestamp interval date binary national character nchar 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. whats the wrong with my code and how can I fix it ?
i have added for price <150
ADD CONSTRAINT cost_price_ck CHECK (price < 150);
DECLARE
price
BEGIN
<Executable Command Missing Here>
insert into orders values (430 k street',books,225);
when (price > 150);
dbms_output.put_line('too expensive ');
END;
i want to do is ,when price is over 150 ,will show too expensive
but i run this code, it show like this
PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national character
nchar
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
whats the wrong with my code and how can I fix it ?
Step by step
Solved in 3 steps