hello ,
(begginer of SQL)
i have to make one pro. in which
i have to use trigger which will fire before inserting into table
and convert the name into upper case but i don't what is the prob.
with the code pls provide ur suggetion
my table attributes are
stu (sno number(6),sname varchar(12),class varchar(12) );
CREATE OR REPLACE TRIGGER trg27
before INSERT ON stu
FOR each ROW
DECLARE
sname1 stu.sname%TYPE;
sno1 stu.sno%TYPE;
class1 stu.class%TYPE;
BEGIN
sno1:=:NEW.sno;
sname1:=:NEW.sname;
sname1:=UPPER(sname1);
class1:=:NEW.class;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error is occured..!!');
INSERT INTO stu VALUES(sno1,sname1,class1);
END;