Tuesday, October 21, 2014

Write PL/SQL code to insert the record in dept table.




DECLARE
DNO NUMBER;
DEPT_NAME DEPT.DNAME%TYPE;
DLOC DEPT.LOC%TYPE;
BEGIN
DNO := &DEPTNO;
DEPT_NAME := ‘&DNAME’;
DLOC := ‘&LOCATION’;
INSERT INTO DEPT VALUES(DNO, DEPT_NAME, DLOC);
DBMS_OUTPUT.PUT_LINE(‘RECORD INSERT’);
END;

No comments: