Home / CSE / SQL Basics :: section-1

CSE :: SQL Basics

  1. Which of the following SQL query is correct for selecting the name of staffs from 'staffinfo' table where salary is 10,000 or 25,000?

  2. A.

     SELECT name FROM staffinfo WHERE salary BETWEEN 10000 AND 25000;

    B.

     SELECT name FROM staffinfo WHERE salary IN (10000, 25000);

    C.

     Both A and B

    D.

     None of the above


  3. Select the right statement to insert values to the student table.

  4. A.

     INSERT student VALUES (

    B.

     INSERT VALUES (

    C.

     INSERT INTO student VALUES (

    D.

     INSERT VALUES INTO student (


  5. ............. joins two or more tables based on a specified column value not equaling a specified column value in another table.

  6. A.

     EQUIJOIN

    B.

     NON-EQUIJOIN

    C.

     OUTER JOIN

    D.

     NATURAL JOIN


  7. In SQL, which command is used to change a table's storage characteristics?

  8. A.

     ALTER TABLE

    B.

     MODIFY TABLE

    C.

     CHANGE TABLE

    D.

     None of these


  9. In SQL, which of the following is not a data definition language commands?

  10. A.

     REVOKE

    B.

     RENAME

    C.

     UPDATE

    D.

     GRANT


  11. 'AS' clause is used in SQL for

  12. A.

     Selection operation.

    B.

     Rename operation.

    C.

     Join operation.

    D.

     Projection operation.


  13. Count function in SQL returns the number of

  14. A.

     values.

    B.

     distinct values.

    C.

     groups.

    D.

     columns.


  15. Which of the following is a valid SQL type?

  16. A.

     CHARACTER

    B.

     NUMERIC

    C.

     FLOAT

    D.

     All of the above


  17. NULL is

  18. A.

     the same as 0 for integer

    B.

     the same as blank for character

    C.

     the same as 0 for integer and blank for character

    D.

     not a value