Answer to Question #235316 in Databases | SQL | Oracle | MS Access for Tarurendra Kushwah

Question #235316

Create table EMP with the following description :Name TypeEMPNO NOT NULL NUMBER(4) ENAME VARCHAR2(10)JOB VARCHAR2(9) MGR NUMBER(4) HIREDATE DATE SAL NUMBER(7,2) COMM NUMBER(7,2) DEPTNO NUMBER(3)AGE NUMBER(3) ESAL NUMBER

a. Get the description EMP table.

b. List all employees details.

c. List all employee names and their salaries, whose salary lies between 1500/- and 3500/- both inclusive.

d. List all employee names and their and their manager whose manager is 7902 or 7566 0r 7789.

e. List all employees who belongs to the department 10 or 20.


1
Expert's answer
2021-09-11T07:01:24-0400
CREATE TABLE emp (
    EMPNO           NUMBER(4) NOT NULL,
    ENAME          VARCHAR2(10),
    JOB             VARCHAR2(9),
    MGR             NUMBER(4),
    HIREDATE        DATE,
    SAL             NUMBER(7,2),
    COMM            NUMBER(7,2),
    DEPTNO          NUMBER(3),
    AGE             NUMBER(3)
    ESAL            NUMBER(4)
);
a) DESC emp;
b) SELECT * FROM emp;
c) SELECT ENAME, SAL FROM emp WHERE SAL BETWEEN 1500 AND 3500;
d) SELECT ENAME, MGR FROM emp WHERE(MGR = 7902)  or  (MGR = 7566 ) or (MGR = 7789 ) 
e)SELECT * FROM emp WHERE DEPTNO = 10 or DEPTNO = 20;




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS