Home / CSE / SQL Basics :: section-1

CSE :: SQL Basics

  1. Which SQL keyword is used to retrieve only unique values?

  2. A.

     DISTINCTIVE

    B.

     UNIQUE

    C.

     DISTINCT

    D.

     DIFFERENT


  3. Which SQL keyword is used to retrieve a maximum value?

  4. A.

     TOP

    B.

     MOST

    C.

     UPPER

    D.

     MAX


  5. What is a view?

  6. A.

     A view is a special stored procedure executed when certain event occurs.

    B.

     A view is a virtual table which results of executing a pre-compiled query. A view is not part of the physical database schema, while the regular tables are.

    C.

     A view is a database diagram.

    D.

     None of these


  • Which of the following SQL commands is used to retrieve data?

  • A.

     DELETE

    B.

     INSERT

    C.

     SELECT

    D.

     JOIN


  • Which of the following is a SQL aggregate function?

  • A.

     LEFT

    B.

     AVG

    C.

     JOIN

    D.

     LEN


  • Which SQL statement is used to update data in a database?

  • A.

     SAVE

    B.

     UPDATE

    C.

     SAVE AS

    D.

     MODIFY


  • Which SQL statement is used to delete data FROM a database?

  • A.

     COLLAPSE

    B.

     REMOVE

    C.

     ALTER

    D.

     DELETE


  • Which SQL keyword is used to sort the result-set?

  • A.

     SORT BY

    B.

     ORDER

    C.

     ORDER BY

    D.

     SORT


  • The SQL statement
    SELECT SUBSTR('123456789', INSTR('abcabcabc', 'b'), 4) FROM DUAL;

  • A.

     6789

    B.

     2345

    C.

     1234

    D.

     456789


  • Which of the following group functions ignore NULL values?

  • A.

     MAX

    B.

     COUNT

    C.

     SUM

    D.

     All of the above