1. Question: What is wrong in this query: Select * from Orders where OrderID=(select OrderID from OrderItems where ItemQty>50)

    A
    In a sub query, * should be used instead of OrderID

    B
    The sub query can return more than one row, so, = should be replaced with in

    C
    The sub query should be used first

    D
    None of these above

    Note: Not available
    1. Report
  2. Question: Which of the following is not an SQL operator?

    A
    Between .. and .

    B
    Like

    C
    In

    D
    Is null

    E
    Having

    F
    Not in

    Note: Not available
    1. Report
  3. Question: Which of the following clauses are not allowed in a single row sub-query?

    A
    From

    B
    Where

    C
    Group by

    D
    Having

    E
    Order by

    Note: Not available
    1. Report
  4. Question: The names of those departments where there are more than 100 employees have to be displayed. Given two relations, employees and departments, which query should be used? Employee --------- Empno Employeename Salary Deptno Department --------- Deptno Departname

    A
    Select departname from department where deptno in (select deptno from employee group by deptno having count(*) > 100);

    B
    Select departname from department where deptno in (select count(*) from employee group by deptno where count(*) > 100);

    C
    Select departname from department where count(deptno) > 100;

    D
    Select departname from department where deptno in (select count(*) from employee where count(*) > 100);

    Note: Not available
    1. Report
  5. Question: The primary key indexing technique does not allow:

    A
    Duplicate data in a field

    B
    Multiple attributes

    C
    Sets of relations

    D
    Many to Many relation

    Note: Not available
    1. Report
  6. Question: You want to manipulate some value in the database upon updation in a trigger function. Which line of the code would be appropriate?

    A
    IF TG_RELID = ''UPDATE'' THEN --Modify the database value END IF;

    B
    IF TG_NAME = ''UPDATE'' THEN --Modify the database value END IF;

    C
    IF TG_OP = ''UPDATE'' THEN --Modify the database value END IF;

    D
    IF TG_ARGV = ''UPDATE'' THEN --Modify the database value END IF;

    Note: Not available
    1. Report
  7. Question: Which of the following statements is correct with regard to PostgreSQL?

    A
    It is an Object Oriented Database Management System

    B
    It is an Object Relational Database Management System

    C
    It is a Relational Database Management System

    D
    It is an Object Based Database Management System

    Note: Not available
    1. Report
  8. Question: Which of the following geometric types is not defined in PostgreSQL?

    A
    path

    B
    box

    C
    hexagon

    D
    polygon

    Note: Not available
    1. Report
  9. Question: You want to update the last modified timestamp in the orders table. The correct way to do this in a PL/pgSQL function, when the parameter integer order_id is passed, would be:

    A
    DECLARE order_id ALIAS FOR $1; mytimestamp timestamp; BEGIN mytimestamp := ''now''; UPDATE orders SET orderid=order_id, lastmodified = mytimestamp; RETURN mytimestamp; END; ' LANGUAGE 'plpgsql';

    B
    DECLARE order_id ALIAS FOR $1; mytimestamp timestamp; BEGIN mytimestamp := 'now'; UPDATE orders SET orderid=order_id, lastmodified = mytimestamp; RETURN mytimestamp; END; ' LANGUAGE 'plpgsql';

    C
    DECLARE order_id ALIAS FOR $1; BEGIN mytimestamp := ''now''; UPDATE orders SET orderid=order_id, lastmodified = ''now''; RETURN mytimestamp; END; ' LANGUAGE 'plpgsql';

    D
    DECLARE order_id ALIAS FOR $1; BEGIN mytimestamp := ''now''; UPDATE orders SET orderid=order_id, lastmodified = 'now'; RETURN mytimestamp; END; ' LANGUAGE 'plpgsql';

    Note: Not available
    1. Report
  10. Question: You have defined a function "Calculate()" in the template1 database. What will happen when you create a new database "ManagementDB" there?

    A
    The function will be moved to the new database

    B
    The function will be cloned to the new database

    C
    The function will remain with the template database only

    D
    Any of these above can happen

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd