A __ is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or update of data.

    Select one:
    a. Procedures
    b. Triggers
    c. Functions
    d. None of the mentioned

    Triggers

    Triggers are automatically generated when a particular operation takes place.


    Any recursive view must be defined as the union of two subqueries: a _ query that is nonrecursive and a __ query.

    Select one:
    a. Base, Redundant
    b. View, Base
    c. Base, recursive
    d. Recursive, Base

    Base, recursive


    Create function dept count(dept_name varchar(20))
    begin
    declare d count integer;
    select count(*) into d count
    from instructor
    where instructor.dept_name=dept_name
    return d count;
    end

    Find the error in the the above statement.
    Select one:
    a. Dept_name is mismatched
    b. All of the mentioned
    c. Reference relation is not mentioned
    d. Return type missing

    d. Return type missing


    In order to simplify the null value confusion in the rank function we can specify __

    Select one:
    a. Not Null
    b. Nulls last
    c. Nulls first
    d. Either Nulls last or first

    d. Either Nulls last or first

    For example:
    select ID, rank ()
    over (order by GPA desc nulls last) as s rank
    from student grades;


    Ranking of queries is done by which of the following?

    Select one:
    a. Group by
    b. Order by
    c. Having
    d. Both Group by and Order by

    b. Order by

    Order by clause arranges the values in ascending or descending order where a default is ascending order.


    The __ function that does not create gaps in the ordering.

    Select one:
    a. Intense_rank()
    b. Default_rank()
    c. Dense_rank()
    d. Continue_rank()

    c. Dense_rank()

    For dense_rank() the tuples with the second highest value all get rank 2, and tuples with the third highest value get rank 3, and so on.


    Triggers __ enabled or disabled

    Select one:
    a. Cannot be
    b. Ought to be
    c. Can be
    d. Always

    Can be

    Triggers can be manipulated.


    Triggers are not supported in

    Select one:
    a. Delete
    b. Update
    c. Views
    d. All of the mentioned

    Views

    The triggers run after an insert, update or delete on a table.
    They are not supported for views.


    What are the different in triggers?

    Select one:
    a. Define, Create
    b. Drop, Comment
    c. Insert, Update, Delete
    d. All of the mentioned

    c. Insert, Update, Delete

    Triggers are not possible for create, drop.


    Which of the following is used to input the entry and give the result in a variable in a procedure?

    Select one:
    a. Out and In
    b. In and out
    c. Get and put
    d. Put and get

    b. In and out

    Create procedure
    dept_count proc(in dept name varchar(20), out d count integer).

    Here in and out refers to input and result of procedure.