MCQs on Data Manipulation Language (DML) in DBMS
- Which SQL statement is used to retrieve data from a database?
- a) SELECT
- b) INSERT
- c) UPDATE
- d) DELETE
Answer: a) SELECT
- 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
- Which SQL statement is used to modify existing records in a table?
- a) MODIFY
- b) CHANGE
- c) UPDATE
- d) ALTER
Answer: c) UPDATE
- Which SQL statement is used to delete records from a table?
- a) REMOVE
- b) DELETE
- c) DROP
- d) TRUNCATE
Answer: b) DELETE
- 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
- What is the purpose of the
SET
clause in anUPDATE
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
- 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
- What happens if you execute a
DELETE FROM table_name
statement without aWHERE
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.
- 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
- 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
- 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()
- 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()
- 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
- 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
- Which SQL function is used to find the smallest value in a column?
- a) MIN()
- b) MAX()
- c) SUM()
- d) AVG()
Answer: a) MIN()
- 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
- 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
- Which function is used to count the number of rows in a table?
- a) COUNT()
- b) SUM()
- c) AVG()
- d) MAX()
Answer: a) COUNT()
- 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
- 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
- Database Models MCQs in DBMS
- Relational Database Model MCQs in DBMS
- SQL (Structured Query Language) MCQs in DBMS
- Database Design MCQs in DBMS
- Database Management System Architecture MCQs in DBMS
- Storage and File Structure MCQs in DBMS
- Query Processing and Optimization MCQs in DBMS
- Database Transaction Management MCQs in DBMS
- Database Security and Authorization MCQs in DBMS
- Backup and Recovery MCQs in DBMS
- Distributed Databases MCQs in DBMS
- SET 1: database design mcqs (database design mcqs )
- SET 2: database mcqs with answers pdf (database mcqs with answers pdf )
- SET 3: modern database management 12th edition mcqs (modern database management 12th edition mcqs)
- SET 4: database systems mcqs (database systems mcqs)
- SET 5: dbms mcqs (dbms mcqs )
- SET 6: dbms mcqs with answers (dbms mcqs with answers)
- SET 7: solved mcqs of dbms (solved mcqs of dbms)
- SET 8: dbms mcqs with answers pdf(dbms mcqs with answers pdf)
- SET 9: relational database management system mcqs(relational database management system mcqs)
- SET 10: solved mcqs of database management system(solved mcqs of database management system)
- SET 11: basic database mcqs pdf (basic database mcqs pdf)
- SET 12: relational database management system mcqs (relational database management system mcqs )
- SET 13: database mcqs online test (database mcqs online test)
- SET 14: database interview questions mcqs (database interview questions mcqs)
- SET 15: database developer mcqs (database developer mcqs)
- SET 16: database Repeated mcqs (database Repeated mcqs)
- SET 17: Database mcqs PPSC (Database mcqs PPSC)
- SET 18: Database mcqs FPSC (Database mcqs FPSC)
- SET 19: DBMS mcqs FPSC (DBMS mcqs FPSC)
New Arrival