-- Created on 2015/6/15 by LYH
declare
v_fnumber varchar2(10):='qwe';
v_fname varchar2(10):='lyh';
v_fage int:=10;
v_fsalary int:=101.00;
begin
INSERT INTO t_employee(fnumber,fname,fage,fsalary)
VALUES(v_fnumber,v_fname,v_fage,v_fsalary);
COMMIT;
end;
-- Created on 2015/6/15 by LYH
declare
v_fnumber varchar2(10):='asd';
v_fname varchar2(10):='gqy';
v_fage int:=12;
v_salary int:=13;
begin
DELETE FROM t_employee
WHERE fname='lyh';
COMMIT;
end;
3.一個修改的例子
-- Created on 2015/6/15 by LYH
declare
v_fnumber varchar2(10):='gqy';
v_fname varchar2(10):='gqy';
v_fage int :='12';
v_fsalary int :='1231231';
begin
UPDATE t_employee
SET fnumber=v_fnumber, fname=v_fname,fage=v_fage,fsalary=v_fsalary
WHERE fnumber='000000';
end;