1. Question: You want to display the titles of books that meet the following criteria: 1. Purchased before Feb 21, 2002 2. Price is less than $500 or greater than $900 You want to sort the result by the date of purchase, starting with the most recently bought book. Which of the following statements should you use?

    A
    SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < '21-FEB-2002' ORDER BY purchase_date;

    B
    SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date < '21-FEB-2002' ORDER BY purchase date ASC;

    C
    SELECT book_title FROM books WHERE price < 500 OR > 900 AND purchase_date DESC;

    D
    SELECT Book_title FROM books WHERE (price < 500 OR price > 900) AND purchase_date < '21-FEB-2002' ORDER BY purchase_date DESC;

    Note: Not available
    1. Report
  2. Question: Which of the following SQL statements accepts user input for the columns to be displayed, table name, and the WHERE condition?

    A
    SELECT &1, "&2"FROM &3 WHERE last_name = '&4';

    B
    SELECT &1, '&2' FROM &3 WHERE '&last_name = '&4'';

    C
    SELECT &1, &2 FROM &3 WHERE last_name = '&4';

    D
    SELECT &1, '&2' FROM EMP WHERE last_name = '&4';

    Note: Not available
    1. Report
  3. Question: Where is the GROUP BY clause statement placed in a SELECT statement that includes a WHERE clause?

    A
    Immediately after the SELECT clause

    B
    Before the WHERE clause

    C
    After the ORDER BY clause

    D
    After the WHERE clause

    Note: Not available
    1. Report
  4. Question: Evaluate the SQL statement given below: SELECT ROUND (45.953, -1), TRUNC (45.936, 2) FROM dual; Which of the following values are displayed?

    A
    46 and 45.93

    B
    50 and 45.93

    C
    50 and 45.9

    D
    45 and 45.93

    E
    45.95 and 45.93

    Note: Not available
    1. Report
  5. Question: Which of the following data types stores data outside the Oracle database?

    A
    UROWID

    B
    BFILE

    C
    BLOB

    D
    NCLOB

    E
    EXTERNAL

    Note: Not available
    1. Report
  6. Question: Which of the following statements are correct with regard to NULL values?

    A
    Only =and !=operator can be used to search for NULL values in a column

    B
    In an ascending order sort, NULL values appear at the bottom of the result set

    C
    Both

    D
    Neither

    Note: Not available
    1. Report
  7. Question: Which of the following operations cannot be performed using the ALTER TABLE statement?

    A
    Rename table

    B
    Rename column

    C
    Drop column

    D
    Drop NOT NULL Constraint

    Note: Not available
    1. Report
  8. Question: Which of the following constraints can be defined only at the column level?

    A
    UNIQUE

    B
    NOT NULL

    C
    CHECK

    D
    PRIMARY KEY

    E
    FOREIGN KEY

    Note: Not available
    1. Report
  9. Question: Which of the following SQL statements defines a FOREIGN KEY constraint on the DEPT NO column of the EMP table?

    A
    CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);

    B
    CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

    C
    CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2) NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));

    D
    CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));

    Note: Not available
    1. Report
  10. Question: Which of the following shows the correct use of the Trunc command on a date?

    A
    TRUNC=To_Date('09-Jan-02,DD-MON-YY,'YEAR',"Date" from Dual;

    B
    Select TRUNC(To_Date('09-Jan-02,DD-MON-YY,YEAR')) "DATE" from Dual;

    C
    Date =TRUNC(To_DATE('09-Jan-02','DD-MON-YY'),'YEAR'),'YEAR)"DATE: from DUAL;

    D
    SELECT TRUNC(TO_DATE('12-Feb-99','DD-MON-YY'), 'YEAR') "Date " FROM DUAL;

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