Dbms Program 1
Dbms Program 1
Connected to:
Connected.
User created.
Grant succeeded.
2 EMPNO NUMBER(5),
3 ENAME VARCHAR2(50),
4 JOB VARCHAR2(50),
5 MANAGER_NO NUMBER(5),
7 COMMISSION NUMBER(10, 2)
8 );
Table created.
Grant succeeded.
Grant succeeded.
2 EMPNO NUMBER(5),
3 ENAME VARCHAR2(50),
4 JOB VARCHAR2(50),
5 MANAGER_NO NUMBER(5),
7 COMMISSION NUMBER(10, 2)
8 );
2 where grantee='employee'
3 order by 1;
no rows selected
SQL> commit;
Commit complete
SQL>Disconnect;
2. Insert the any three records in the employee table contains attributes EMPNO,ENAME
JOB, MANAGER_NO, SAL, COMMISSION and use rollback. Check the result.
INSERT INTO Employee (EMPNO, ENAME, JOB, MANAGER_NO, SAL, COMMISSION)
ROLLBACK;
3. Add primary key constraint and not null constraint to the employee table.
ALTER TABLE Employee
ADD CONSTRAINT pk_employee PRIMARY KEY (MANAGER_NO);
4.Insert null values to the employee table and verify the result.