DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: SQL Questions

  1. #1
    Join Date
    May 2001
    Posts
    5
    Hi,
    Can someone provide asnwers to the following questions;


    1. WHICH IS NOT AN SQL*PLUS COMMAND?
    a) LIST
    b) ACCEPT
    c) CHANGE
    d) UPDATE
    e) DESCRIBE

    2.. Which statement about multiple column subquery is true?

    A. A pairwiese comparison produces a cross product
    B. A nonpairwise comparison produces a cross product
    C. In a pairwise subquery, the value return from the subquery is
    compared individually to the values in the outer query
    D. In a nonpairwise subquery, the value return from the subquery is
    compared grouply to the values in the outer query

    3. You query the database with this command:
    SELECT id_no, quantity
    FROM sales;
    Which value is displayed when the quantity is null?

    a) 0
    b) nothing
    c) the keyword NULL
    d) 100

    4. Evaluate this command:
    SELECT count(*)
    FROM inventory
    WHERE price > 5
    GROUP BY manufacturer_id
    HAVING count(*) > 10
    ORDER BY order_date;
    Which clause specifies which group will be displayed?

    a) WHERE price > 5
    b) GROUP BY manufacturer_id
    c) HAVING count(*) > 10
    d) ORDER BY order_date

    5. You create a table with this statement:
    1. CREATE TABLE alpha_3000
    2. (alpha_id& NUMBER(9),
    3. CONSTRAINT alpha_3000_id_pk PRIMARY KEY,
    4. name$ VARCHAR2(25),
    5. title# VARCHAR2(25),
    6. comment VARCHAR2(25)
    7. CONSTRAINT alpha_3000_idname_nn NOT NULL);
    Which two lines of column name are invalid?

    a) 2, 4
    b) 2, 6
    c) 4, 5
    d) 4, 6

    6. Which of following statement can retrieve all data dictionary
    views that you can access?

    a). SELECT * FROM user_views;
    b). SELECT * FROM dictionary;
    c). SELECT * FROM all_views;
    d). SELECT * FROM user_objects;


    7. For which task would it most appropriate to use a PL/SQL WHILE loop?
    a). to add new services to the service table until finished
    b). to add six new services to the service table
    c). to change machine_id 456756 to 576878
    d). to change machine_id 456756 to 576878 and change all others to 999999


    8. Examine the following command:

    CREATE TABLE pay
    (employee-id Number(9)
    CONSTRAINT pay-pk PRIMARY KEY,
    2000-pay NUMBER(8,2)
    manager-name VARCHAR2(25)
    CONSTRAINT mgr-name-nn. NOT NULL,
    pay-96 NUMBER(8,2));

    Which two lines of this command will return an error?

    a. First
    b. Second
    c. Third
    d. Fourth
    e. Fifth
    f. Sixth
    g. Seventh


    9. When using an explicit cursor, after which statement should you test
    to see if the cursor contains rows?
    a). CURSOR
    b). FETCH
    c). OPEN
    d). CLOSE

    10. Which type of exception requires a RAISE statement?
    a). user-defined error
    b). non-predefined Oracle7 Server error
    c). predefined Oracle7 Server error
    d). none

    11. When PL/SQL passed to PL/SQL engine, how does it process the block?
    a). saperate SQL statements and send it to SQL statement executor
    b). saperate SQL statements and send it to procedural statement executor
    c). Group the SQL statements and send them to SQL statement executor
    d). Group the SQL statements and send them to procedural statement executor


  2. #2
    Join Date
    Mar 2001
    Posts
    635
    Hi

    I can answer some of the questions I have denoted the line with the word (Answer)

    1. WHICH IS NOT AN SQL*PLUS COMMAND?
    a) LIST
    b) ACCEPT
    c) CHANGE
    d) UPDATE (Answer)
    e) DESCRIBE

    3. You query the database with this command:
    SELECT id_no, quantity
    FROM sales;
    Which value is displayed when the quantity is null?

    a) 0
    b) nothing (Answer)
    c) the keyword NULL
    d) 100

    4. Evaluate this command:
    SELECT count(*)
    FROM inventory
    WHERE price > 5
    GROUP BY manufacturer_id
    HAVING count(*) > 10
    ORDER BY order_date;
    Which clause specifies which group will be displayed?

    a) WHERE price > 5
    b) GROUP BY manufacturer_id
    c) HAVING count(*) > 10 (Answer)
    d) ORDER BY order_date

    5. You create a table with this statement:
    1. CREATE TABLE alpha_3000
    2. (alpha_id& NUMBER(9),
    3. CONSTRAINT alpha_3000_id_pk PRIMARY KEY,
    4. name$ VARCHAR2(25),
    5. title# VARCHAR2(25),
    6. comment VARCHAR2(25)
    7. CONSTRAINT alpha_3000_idname_nn NOT NULL);
    Which two lines of column name are invalid?

    a) 2, 4
    b) 2, 6 (Answer)
    c) 4, 5
    d) 4, 6

    6. Which of following statement can retrieve all data dictionary
    views that you can access?

    a). SELECT * FROM user_views;
    b). SELECT * FROM dictionary;
    c). SELECT * FROM all_views;
    d). SELECT * FROM user_objects; (Answer)

    8. Examine the following command:

    CREATE TABLE pay
    (employee-id Number(9)
    CONSTRAINT pay-pk PRIMARY KEY,
    2000-pay NUMBER(8,2)
    manager-name VARCHAR2(25)
    CONSTRAINT mgr-name-nn. NOT NULL,
    pay-96 NUMBER(8,2));

    8) Which two lines of this command will return an error?

    a. First
    b. Second (Answer)
    c. Third
    d. Fourth (Answer)
    e. Fifth
    f. Sixth
    g. Seventh

    9. When using an explicit cursor, after which statement should you test
    to see if the cursor contains rows?
    a). CURSOR
    b). FETCH (answer)
    c). OPEN
    d). CLOSE

    10. Which type of exception requires a RAISE statement?
    a). user-defined error (Answer)
    b). non-predefined Oracle7 Server error
    c). predefined Oracle7 Server error
    d). none

    11. When PL/SQL passed to PL/SQL engine, how does it process the block?
    a). saperate SQL statements and send it to SQL statement executor
    b). saperate SQL statements and send it to procedural statement executor
    c). Group the SQL statements and send them to SQL statement executor
    d). Group the SQL statements and send them to procedural statement executor (Answer) Not very sure about this

    Regards




    Santosh

  3. #3
    Join Date
    May 2001
    Posts
    5
    Thks for your help Santosh

  4. #4
    Join Date
    Dec 2000
    Posts
    22
    i feel question 6 and 10 answer is not right.
    my answer:
    6. Which of following statement can retrieve all data dictionary
    views that you can access?

    a). SELECT * FROM user_views;
    b). SELECT * FROM dictionary; V
    c). SELECT * FROM all_views;
    d). SELECT * FROM user_objects;

    8) Which two lines of this command will return an error?

    a. First
    b. Second
    c. Third
    d. Fourth V
    e. Fifth
    f. Sixth V
    g. Seventh

  5. #5
    Join Date
    Mar 2001
    Posts
    27

    Thumbs down

    Yes, I think davidpan is right.

    The answer for the question 6 is (b)
    & for the question 8 is (d) & (f)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width