pl/sql 中操作DML語句

來源:互聯網
上載者:User

INSERT  DECLARE v_empno emp.empno%TYPE := &empno; v_ename emp.ename%TYPE := ‘&ename’; v_salary emp.sal%TYPE := &sal; BEGIN INSERT INTO emp(empno,ename,sal) VALUES(v_empno,v_ename,v_salary); COMMIT; END;  UPDATE  DECLARE v_empno emp.empno%TYPE; v_salary emp.sal%TYPE :=&sal; BEGIN UPDATE emp SET sal=v_salary where empno=1234; COMMIT; END;  DELETE  DECLARE v_empno emp.empno%TYPE :=&eno; BEGIN DELETE emp WHERE empno=v_empno; COMMIT; END
在PL/SQL中& 表示彈出框提示你輸入值

相關文章

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.