Home | Solved Mcqs | Second Chapter Solved Exercise MCQs Of ICS Second Year Computer Science

Second Chapter Solved Exercise MCQs Of ICS Second Year Computer Science

September 21, 2024

Second Chapter Solved Exercise MCQs Of ICS Second Year Computer Science. Each question includes the correct answer and a brief explanation. It’s designed to help you study, prepare for exams, and understand key concepts better. Boost your Computer Science knowledge with these practice exercises.

Second chapter solved MCQs with explanation

1. The JOIN operation is used to:
a) combine rows from two or more tables

b) delete rows from a table
c) create a new table
d) update rows in a table

Explanation: The JOIN operation in SQL is used to combine rows from two or more tables based on a related column between them.

2. Insert command is used to insert:
a) a new table
b) a new record
c) a view
d) dependencies

Explanation: The Insert command in SQL is specifically designed to add a new record (or row) to an existing table.

3. CREATE command is used to create a:
a) table

b) view
c) report
d) query

Explanation: The CREATE command in SQL is used to create new database objects, such as tables.

4.SQL is used for:
a) data definition
b) data manipulation
c) data definition and manipulation
d) searching records

Explanation: SQL is used both for defining the structure of databases (data definition) and for manipulating the data within them (data manipulation).

5. The foreign key is found in:
a) parent table
b) dependent table
c) pivot table
d) index table

Explanation: A foreign key is located in the dependent table and is used to link it to the primary key of another (parent) table.

6. A table must have:
a) primary key

b) secondary key
c) composite key
d) sort key

Explanation: A primary key is necessary to uniquely identify each record in a table.

7. The SELECT statement is used to:
a) retrieve data from a database

b) delete data from a table
c) modify data in a table
d) create a new table

Explanation: The SELECT statement is used to retrieve or query data from one or more tables in a database.

8. The WHERE clause is used to:
a) group records
b) filter records
c) sort records
d) combine records

Explanation: The WHERE clause in SQL is used to filter records based on specific conditions.

9. An index in a database is used to:
a) store data
b) improve the speed of data retrieval
c) enforce data integrity
d) secure data

Explanation: An index is used to speed up the retrieval of records by providing quick access to the rows in a table.

10. The command used to remove a table from a database is:
a) DROP INDEX
b) DROP TABLE
c) DELETE TABLE
d) REMOVE TABLE

Explanation: The DROP TABLE command is used to delete a table and all its data from the database permanently.