1.简单数据插入例子
-- 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;
2. 简单数据删除例子
-- 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;
时间: 2024-11-07 09:46:11