oracle學習之路(六)兩個實際使用的例子,oracle之路

來源:互聯網
上載者:User

oracle學習之路(六)兩個實際使用的例子,oracle之路
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;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.