Archive


Category: Database

  • DEPT and EMP Table Scripts Oracle Database

    create table dept(deptno number(2,0),dname varchar2(14),loc varchar2(13),constraint pk_dept primary key (deptno)) ; create table emp(empno number(4,0),ename varchar2(10),job varchar2(9),mgr number(4,0),hiredate date,sal number(7,2),comm number(7,2),deptno number(2,0),constraint pk_emp primary key (empno),constraint fk_deptno foreign key (deptno) references dept (deptno)); INSERT INTO DEPT VALUES (10, ‘ACCOUNTING’, ‘NEW YORK’);INSERT INTO DEPT VALUES (20, ‘RESEARCH’, ‘DALLAS’);INSERT INTO DEPT VALUES (30, ‘SALES’, ‘CHICAGO’);INSERT INTO DEPT […]

  • Oracle Database PLSQL Triggers

    What is a Trigger Is a PL/SQL block or PL/SQL procedure associated with a table, view, schema, or the database Executes implicitly whenever a particular event takes place Can be either : – DML Trigger : Fires whenever an DML event occurs – Non-DML Trigger : Fires whenever any DDL event or Database Event occurs […]

  • SQL For Non Technical

    Tough job for a functional or business analyst is to understand the nuance of Database. It is not that much complex which is generally thought, i came across about this from most of my colleagues and fellow students on this. Following is my approach for this. Get clarity on the capabilities of Database – Architecture, […]