SQL


Q41.

Which commands are used to control access over objects in relational database?
GateOverflow

Q42.

Which of the following is aggregate function in SQL?
GateOverflow

Q43.

Database table by name Loan_Records is given below. What is the output of the following SQL query? SELECT count(*) FROM( (SELECT Borrower. Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T);
GateOverflow

Q44.

Consider the following relational schema:Student(school-id,sch-roll-no,sname,saddress) School(school-id,sch-name,sch-address,sch-phone) Enrolment(school-id,sch-roll-no,erollno,examname) ExamResult(erollno,examname,marks) What does the following SQL query output?SELECT sch-name, COUNT (*) FROM School C, Enrolment E, ExamResult R WHERE E.school-id = C.school-id AND E.examname = R.examname AND E.erollno = R.erollno AND R.marks = 100 AND S.school-id IN (SELECT school-id FROM student GROUP BY school-id HAVING COUNT (*) > 200) GROUP By school-id
GateOverflow

Q45.

Consider the following schema:Emp (Empcode, Name, Sex, Salary, Deptt)A simple SQL query is executed as follows: SELECT Deptt FROM Emp GROUP by Dept Having avg (Salary) > {select avg (Salary) from Emp}The output will be
GateOverflow