Multiple Choice Questions -SQL

37 Questions | Total Attempts: 782

SettingsSettingsSettings
Please wait...
Multiple Choice Questions -SQL

.


Questions and Answers
  • 1. 
    Full form of RDBMS is
    • A. 

      Regional district management system

    • B. 

      Relational database management system

    • C. 

      Regular database management system

    • D. 

      Regular district machine system

  • 2. 
    Full form of SQL is
    • A. 

      Structured Query Language

    • B. 

      Simple Query Language

    • C. 

      Simple Query Limit

    • D. 

      Structured Query Limit

  • 3. 
    A row of relation generally referred to as ……….. and column of a relation is ………… 
    • A. 

      Domain & Attribute

    • B. 

      Attribute & Domain

    • C. 

      Tuple & Attribute

    • D. 

      Attribute & Tuple

  • 4. 
    A relation has 45 tuples & 5 attributes, what will be the Degree & Cardinality of that relation? 
    • A. 

      Degree 5, Cardinality 45

    • B. 

      Degree 45, Cardinality 5

    • C. 

      Degree 50, Cardinality 45

    • D. 

      Degree 50, Cardinality 2250

  • 5. 
    _________is the attribute or group of attributes that uniquely identify occurrence of each entity.
    • A. 

      Foreign key

    • B. 

      Super Key

    • C. 

      Primary Key

    • D. 

      All of these

  • 6. 
    A non-key attribute, whose values are derived from primary key of some other table. 
    • A. 

      Alternate key

    • B. 

      Foreign key

    • C. 

      Primary key

    • D. 

      Super Key

  • 7. 
    MySQL database system consists of- 
    • A. 

      MySQL Server Instance

    • B. 

      MySQL Database

    • C. 

      MySQL Query Optimizer

    • D. 

      (a) & (b) both

  • 8. 
    Which commands are used to define or redefine schema objects? 
    • A. 

      DDL

    • B. 

      DML

    • C. 

      TCL

    • D. 

      (a) & (b) both

  • 9. 
    Data definition includes: 
    • A. 

      Creating database

    • B. 

      Undoing changes to the database.

    • C. 

      Modification of data stored in the database.

    • D. 

      All of the above

  • 10. 
    Which is not a function of DML? 
    • A. 

      Retrieval of data stored in the database

    • B. 

      Insertion of data in to the database

    • C. 

      Deletion of data from the database

    • D. 

      Making changes permanent to the database.

  • 11. 
    Which is not a numeric type? 
    • A. 

      Int

    • B. 

      Float

    • C. 

      Blob

    • D. 

      Double

  • 12. 
    The default date format in MySQL is: 
    • A. 

      DD/MM/YYYY

    • B. 

      YYYY/MM/DD

    • C. 

      MM-DD-YYYY

    • D. 

      YYYY-MM-DD

  • 13. 
    The command is used to access database in MySQL is- 
    • A. 

      Open <databasename>;

    • B. 

      USE <databasename>;

    • C. 

      Access <databasename>;

    • D. 

      (a) & (b) both

  • 14. 
    Which is a valid CREATE TABLE statement? 
    • A. 

      Create table emp add(id integer(3));

    • B. 

      Create table emp (id integers(3));

    • C. 

      Create table emp modified (id integer(3));

    • D. 

      Create table emp (id integer(3));

  • 15. 
    How can you insert a new row into the “STORE” table. 
    • A. 

      INSERT ROW (1,‟ RAM SINGH‟) INTO STORE;

    • B. 

      INSERT VALUES (1,‟ RAM SINGH‟) INTO STORE;

    • C. 

      INSERT INTO (1,‟ RAM SINGH‟) STORE;

    • D. 

      INSERT INTO STORE VALUES (1,‟ RAM SINGH‟);

  • 16. 
    Conditionally retrieval of rows from a table with SELECT, which clause is used? 
    • A. 

      Where

    • B. 

      Having

    • C. 

      Group By

    • D. 

      Order by

  • 17. 
    The ……………. key word eliminates duplicate rows from the result of a SELECT statement. 
    • A. 

      All

    • B. 

      Unique

    • C. 

      Distinct

    • D. 

      IN

  • 18. 
    Which operator defines a range of values that the column values must fall in? 
    • A. 

      In

    • B. 

      Like

    • C. 

      Between

    • D. 

      IS

  • 19. 
    To specify a list of values …………. Operator is used. 
    • A. 

      IN

    • B. 

      Like

    • C. 

      Between

    • D. 

      IS

  • 20. 
    Which SQL statement will not generate any error message? 
    • A. 

      SELECT * FROM EMP WHERE EMPNO LIKE (1,2,3,4);

    • B. 

      SELECT * FROM EMP WHERE SAL BETWEEN 3000 TO 15000;

    • C. 

      SELECT * FROM EMP WHERE COMM IS NOT NULL;

    • D. 

      All of the above

  • 21. 
    Which statement is valid? 
    • A. 

      ALTER TABLE EMPLOYEE MODIFY (last_name CHAR2(2000));

    • B. 

      ALTER TABLE EMPLOYEE CHANGE (last_name CHAR2(2000));

    • C. 

      ALTER TABLE EMPLOYEE CHANGE (last_name VARCHAR2 (2000));

    • D. 

      ALTER TABLE EMPLOYEE MODIFY (last_name VARCHAR2 (2000));

  • 22. 
    Which is true in respect of Select Statement?
    • A. 

      By Select we can retrieve all the rows from table.

    • B. 

      By where clause with select we can retrieve selected rows from table.

    • C. 

      We can retrieve unique rows from table with the use of Distinct key word.

    • D. 

      All of the above.

  • 23. 
    The clause which sorts data of table.
    • A. 

      Group by clause

    • B. 

      Having clause

    • C. 

      Order by Clause

    • D. 

      Where Clause

  • 24. 
    Which option cause a group function to consider only distinct values. 
    • A. 

      All

    • B. 

      Distinct

    • C. 

      Unique

    • D. 

      Diverse

  • 25. 
    MySQL is
    • A. 

      A Programming language

    • B. 

      A Processing language

    • C. 

      A technique for writing reliable programs

    • D. 

      A Relational Database Management System

Back to Top Back to top