You are on page 1of 1

Kendriya Vidyalaya Fort William

Assignment IP 2020-21 06/04/2020

Consider the following table employee and answer the questions:

1. Find primary key of the given table.

2. Find degree and cardinality of given table.

3. Is there any other key or keys which can serve as primary key? If yes then write its name.

4. What is the name of key which can serve as primary key but is neither primary key nor
candidate key.

5. Write sql query for the following:

i. display all records of employee which are in the HR position.

Ii. Display all records of empoloyee who are of manager department.

iii. Display all records of employee whose names are having exactly 5 characters.

Iv. Display id , name and position of employees which are of level 1 or level 3 in ascending
order of their levels.

v. find output for :

(a) select concat(name, “ “, department) from employee where level=2;

(b) select left(name,3) from employee where department=manager and position


=“marketing”;

(c) select upper(ename) from employee where Manager is NULL order by level desc;

You might also like