Thursday 14 April 2016

SQL MCQ Questions

  1. Which of the following creates temporary relation for the query on which it is defined ?
  2.         With
            From
            Where
            Select
  3. The EXISTS keyword will be true if:
  4.         Any row in the subquery meets the condition only.
            All rows in the subquery fail the condition only.
            Both of these two conditions are met.
            Neither of these two conditions is met.
  5. Which of the following relational algebra operations do not require the participating tables to be union-compatible?
  6.         Union
            Insertion
            Difference
            Join
  7. Which of the following operations need the participating relations to be union compatible?
  8.         Union
            Insertion
            Difference
            All the above
  9. Select name from instructor where salary <=100000 and salary >=90000;
    This query can be replaced by which of the following ?
  10.         Select name from instructor where salary between 90000 and 100000;
            Select name from employee where salary <= 90000 and salary>=100000;
            Select name from employee where salary between 90000 and 100000;
            Select name from instructor where salary between 100000 and 90000;
  11. Select __________
    from instructor
    where dept name= ’Comp. Sci.’;
    Which of the following should be used to find the mean of the salary ?
  12.         Mean(salary)
            Count(salary)
            Avg(salary)
            Sum(salary)
  13. Aggregate functions are functions that take a ___________ as input and return a single value
  14.         Collection of values
            Single value
            Aggregate value
            Both a & b

No comments:

Post a Comment