Home / CSE / SQL Basics :: section-1

CSE :: SQL Basics

  1. When using the SQL INSERT statement:

  2. A.

     rows cannot be copied in mass from one table to another only.

    B.

     rows can be modified according to criteria only.

    C.

     rows can either be inserted into a table one at a time or in groups.

    D.

     rows can be inserted into a table only one at a time only.


  3. The SQL ALTER statement can be used to:

  4. A.

     change the table data.

    B.

     change the table structure.

    C.

     delete rows from the table.

    D.

     add rows to the table.


  5. What SQL command can be used to delete columns from a table?

  6. A.

     MODIFY TABLE TableName DROP ColumnName

    B.

     MODIFY TABLE TableName DROP COLUMN ColumnName

    C.

     ALTER TABLE TableName DROP ColumnName

    D.

     ALTER TABLE TableName DROP COLUMN ColumnName


  7. What SQL command can be used to add columns to a table?

  8. A.

     ALTER TABLE TableName ADD ColumnName

    B.

     ALTER TABLE TableName ADD COLUMN ColumnName

    C.

     MODIFY TABLE TableName ADD ColumnName

    D.

     MODIFY TABLE TableName ADD COLUMN ColumnName


  9. The command to remove rows from a table 'CUSTOMER' is:

  10. A.

     DROP FROM CUSTOMER ...

    B.

     UPDATE FROM CUSTOMER ...

    C.

     REMOVE FROM CUSTOMER ...

    D.

     DELETE FROM CUSTOMER WHERE ...


  11. The SQL WHERE clause:

  12. A.

     limits the row data are returned.

    B.

     limits the column data that are returned.

    C.

     Both A and B are correct.

    D.

     Neither A nor B are correct.


  13. Which of the following is the original purpose of SQL?

  14. A.

     To define the data structures

    B.

     To specify the syntax and semantics of SQL data definition language

    C.

     To specify the syntax and semantics of SQL manipulation language

    D.

     All of the above.


  15. The wildcard in a WHERE clause is useful when?

  16. A.

     An exact match is necessary in a CREATE statement.

    B.

     An exact match is necessary in a SELECT statement.

    C.

     An exact match is not possible in a SELECT statement.

    D.

     An exact match is not possible in a CREATE statement.


  17. The command to eliminate a table from a database is:

  18. A.

     DROP TABLE CUSTOMER;

    B.

     DELETE TABLE CUSTOMER;

    C.

     REMOVE TABLE CUSTOMER;

    D.

     UPDATE TABLE CUSTOMER;


  19. The SQL keyword(s) ________ is used with wildcards.

  20. A.

     NOT IN only

    B.

     LIKE only

    C.

     IN only

    D.

     IN and NOT IN