Professional Documents
Culture Documents
Algebra and SQL Examples: (The True Answer Is Underlined)
Algebra and SQL Examples: (The True Answer Is Underlined)
:Employee table
tel addres super Dno Salary lname fanme Number
:Department table
mgrsn locate dname dno
2- (σ * (department)
) means:
a. select only names from the table
b. select names and number
c- a+b
d. not of above
14. (G count (* )
employee
) the result is:
a. the number of all who’s named ali
b. the number of employee
c. the number of employee who lives amman
d. not of above
a. number of department
b. dno and number of department
c. dno and number of employee
d. not of above
.
19. (π fname ) ( ــπ
(department)
)fname
(employee)
mgrsnn super
17. ( a. fname who are manager)andthe
dnamelistG employee X department
not aresult is:
supervisor
dno.employee=dno.department
b. list fname who are supervisor and not a manager
c. a + bcount ( *)
d.
a. not
dnameof above
and number of department
b. dnum and employee name works on
c. dname and number of employee works on
20. (πd.
(department)
not of above
fname ) U (π fname
(employee)
)
mgrsnn super
22. (π fname
(employee)
) ( ــπ fname
(employee X department)
)
ssn.employee=number.employee
a. select all inforamtion about whose names ali and salary greater or equal 500
b. select all information about whose names ali and salary lessthan or equal 500
c. select all inforamtion about whose names ali and salary greater 500
d. not of above
group
group
30. ( select fname, tel, dname from employee, department ) ; means:
where dno.employee=dno.dpartment
^ dno = 4
A. select addrss,telphon,dname for all employee
b. list addrss,telphon,dnumber for all employee.
c. list addrss,telphon,dname for all employee and department name.
d. list fname,tel, dname for employee who works on department number 4
group
34. ( select fname from employee )
Group by max (salary)
the result is:
a. the max salary from department table
b. the max salary from employee table
c. a + b
d. not of a bove
group
40. ( select fname from employee ) ( ــselect fname from employee)
where mgrsnn=number where superssn=number
group
44. ( select * from employee )
Where fname=”%a%”
a. list all information for employee who his name start by a character
b. list all information for employee who his name end by a character
c. list all information for employee who his name having a character
d. not of above