Data Manipulation Language (DML) MCQs in DBMS

By: Prof. Dr. Fazal Rehman Shamil | Last updated: September 23, 2024

MCQs on Data Manipulation Language (DML) in DBMS

  1. Which SQL statement is used to retrieve data from a database?
    • a) SELECT
    • b) INSERT
    • c) UPDATE
    • d) DELETE

    Answer: a) SELECT

  2. Which SQL statement is used to insert new records into a table?
    • a) INSERT INTO
    • b) ADD RECORD
    • c) UPDATE
    • d) INSERT RECORD

    Answer: a) INSERT INTO

  3. Which SQL statement is used to modify existing records in a table?
    • a) MODIFY
    • b) CHANGE
    • c) UPDATE
    • d) ALTER

    Answer: c) UPDATE

  4. Which SQL statement is used to delete records from a table?
    • a) REMOVE
    • b) DELETE
    • c) DROP
    • d) TRUNCATE

    Answer: b) DELETE

  5. What does the SELECT * FROM table_name WHERE condition statement do?
    • a) Selects all columns and rows from the table where the condition is true
    • b) Selects specific columns and rows from the table where the condition is true
    • c) Inserts new rows into the table
    • d) Deletes rows from the table based on the condition

    Answer: a) Selects all columns and rows from the table where the condition is true

  6. What is the purpose of the SET clause in an UPDATE statement?
    • a) To specify which rows to update
    • b) To define new values for the columns
    • c) To delete existing records
    • d) To filter rows to be updated

    Answer: b) To define new values for the columns

  7. Which clause is used in a SELECT statement to limit the number of rows returned?
    • a) LIMIT
    • b) TOP
    • c) MAX
    • d) ROWS

    Answer: a) LIMIT

  8. What happens if you execute a DELETE FROM table_name statement without a WHERE clause?
    • a) It deletes all records in the table.
    • b) It only deletes records that match a specific condition.
    • c) It removes the table structure.
    • d) It updates records in the table.

    Answer: a) It deletes all records in the table.

  9. Which SQL clause is used to sort the result set in ascending or descending order?
    • a) ORDER BY
    • b) GROUP BY
    • c) SORT
    • d) LIMIT

    Answer: a) ORDER BY

  10. Which SQL statement can be used to add a new column to an existing table?
    • a) ALTER TABLE … ADD COLUMN
    • b) MODIFY TABLE … ADD COLUMN
    • c) UPDATE TABLE … ADD COLUMN
    • d) INSERT INTO TABLE … ADD COLUMN

    Answer: a) ALTER TABLE … ADD COLUMN

  11. Which SQL function is used to calculate the average value of a numeric column?
    • a) AVG()
    • b) SUM()
    • c) COUNT()
    • d) MAX()

    Answer: a) AVG()

  12. Which SQL function is used to find the total sum of a numeric column?
    • a) SUM()
    • b) COUNT()
    • c) AVG()
    • d) MIN()

    Answer: a) SUM()

  13. What is the purpose of the JOIN clause in SQL?
    • a) To combine rows from two or more tables based on a related column
    • b) To update records in a table
    • c) To delete records from a table
    • d) To sort the result set

    Answer: a) To combine rows from two or more tables based on a related column

  14. Which keyword is used to specify the conditions for selecting rows from a table?
    • a) WHERE
    • b) HAVING
    • c) GROUP BY
    • d) ORDER BY

    Answer: a) WHERE

  15. Which SQL function is used to find the smallest value in a column?
    • a) MIN()
    • b) MAX()
    • c) SUM()
    • d) AVG()

    Answer: a) MIN()

  16. What does the SQL INSERT INTO ... SELECT statement do?
    • a) Inserts data into a table based on the result of a SELECT query
    • b) Updates data in a table based on the result of a SELECT query
    • c) Deletes data from a table based on the result of a SELECT query
    • d) Creates a new table based on the result of a SELECT query

    Answer: a) Inserts data into a table based on the result of a SELECT query

  17. Which SQL command is used to modify only a single row in a table?
    • a) UPDATE … WHERE
    • b) DELETE … WHERE
    • c) SELECT … WHERE
    • d) INSERT … WHERE

    Answer: a) UPDATE … WHERE

  18. Which function is used to count the number of rows in a table?
    • a) COUNT()
    • b) SUM()
    • c) AVG()
    • d) MAX()

    Answer: a) COUNT()

  19. What is the purpose of the DISTINCT keyword in a SQL query?
    • a) To remove duplicate rows from the result set
    • b) To sort the result set in ascending order
    • c) To limit the number of rows returned
    • d) To group rows based on specified columns

    Answer: a) To remove duplicate rows from the result set

  20. What does the UPDATE ... SET ... WHERE statement do in SQL?
    • a) Updates records in a table based on a condition specified in the WHERE clause
    • b) Deletes records from a table based on a condition specified in the WHERE clause
    • c) Retrieves records from a table based on a condition specified in the WHERE clause
    • d) Inserts new records into a table based on a condition specified in the WHERE clause

    Answer: a) Updates records in a table based on a condition specified in the WHERE clause

 

More MCQs Of Database Systems

  1. Database Models MCQs in DBMS
    1. Hierarchical model MCQs in DBMS
    2. Network model MCQs in DBMS
    3. Relational model MCQs in DBMS
    4. Object-oriented model MCQs in DBMS
    5. NoSQL databases MCQs in DBMS
  2. Relational Database Model MCQs in DBMS
    1. tables, attributes, tuples, and relations MCQs in DBMS
    2. Primary keys and foreign keys MCQs in DBMS
    3. Integrity constraints MCQs in DBMS
  3. SQL (Structured Query Language) MCQs in DBMS
    1. Data Definition Language (DDL) MCQs in DBMS
    2. Data Manipulation Language (DML) MCQs in DBMS
    3. Data Control Language (DCL) MCQs in DBMS
    4. Transaction Control Language (TCL) MCQs in DBMS
    5. Advanced SQL queries and functions MCQs in DBMS
  4. Database Design MCQs in DBMS
    1. Entity-Relationship (ER) modeling MCQs in DBMS
    2. Extended ER modeling MCQs in DBMS
    3. Normalization and normal forms (1NF, 2NF, 3NF, BCNF) MCQs in DBMS
    4. Denormalization MCQs in DBMS
  5. Database Management System Architecture MCQs in DBMS
    1. Three-schema architecture (external, conceptual, internal) MCQs in DBMS
    2. Data independence MCQs in DBMS
    3. DBMS components and functions MCQs in DBMS
  6. Storage and File Structure MCQs in DBMS
    1. Data storage on physical media MCQs in DBMS
    2. File organization and access methods MCQs
    3. Indexing (B-trees, hash indexing) MCQs in DBMS
    4. RAID technology MCQs in DBMS
  7. Query Processing and Optimization MCQs in DBMS
  8. Database Transaction Management MCQs in DBMS
    1. ACID properties (Atomicity, Consistency, Isolation, Durability) MCQs in DBMS
    2. Transaction states and lifecycle MCQs in DBMS
    3. Concurrency control techniques (locking, timestamping, multiversion) MCQs in DBMS
    4. Deadlock detection and resolution MCQs in DBMS
  9. Database Security and Authorization MCQs in DBMS
    1. Authentication and authorization mechanisms MCQs in DBMS
    2. Data encryption techniques MCQs in DBMS
    3. Role-based access control MCQs in DBMS
    4. SQL injection prevention MCQs in DBMS
  10. Backup and Recovery MCQs in DBMS
    1. Backup types and strategies MCQs in DBMS
    2. Recovery techniques (log-based, shadow paging) MCQs in DBMS
    3. Disaster recovery planning MCQs in DBMS
  11. Distributed Databases MCQs in DBMS
    1. Distributed database architecture MCQs MCQs in DBMS
    2. Data fragmentation, replication, and allocation in DBMS
    3. Distributed query processing MCQs in DBMS
    4. Consistency models and protocols MCQs in DBMS
  1. SET 1: database design mcqs (database design mcqs )
  2. SET 2: database mcqs with answers pdf (database mcqs with answers pdf )
  3. SET 3: modern database management 12th edition mcqs (modern database management 12th edition mcqs)
  4. SET 4: database systems mcqs (database systems mcqs)
  5. SET 5: dbms mcqs (dbms mcqs )
  6. SET 6: dbms mcqs with answers (dbms mcqs with answers)
  7. SET 7: solved mcqs of dbms (solved mcqs of dbms)
  8. SET 8: dbms mcqs with answers pdf(dbms mcqs with answers pdf)
  9. SET 9: relational database management system mcqs(relational database management system mcqs)
  10. SET 10: solved mcqs of database management system(solved mcqs of database management system)
  11. SET 11: basic database mcqs pdf (basic database mcqs pdf)
  12. SET 12: relational database management system mcqs (relational database management system mcqs )
  13. SET 13: database mcqs online test (database mcqs online test)
  14. SET 14: database interview questions mcqs (database interview questions mcqs)
  15. SET 15: database developer mcqs (database developer mcqs)
  16. SET 16: database Repeated mcqs (database Repeated mcqs)
  17. SET 17: Database mcqs PPSC (Database mcqs PPSC)
  18. SET 18: Database mcqs FPSC (Database mcqs FPSC)
  19. SET 19: DBMS mcqs FPSC (DBMS mcqs FPSC)

New Arrival

Database interview questions