Skip to main content

Databases Handling MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Databases Handling with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
39
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
47 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
39

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/39 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 39
★ FPSC ★ PPSC

The updated MySQL extension released with PHP 5 is typically referred to as.

Question 2 of 39
★ FPSC ★ PPSC

Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?

Question 3 of 39
★ FPSC ★ PPSC

In which version of PHP was MySQL Native Driver(also known as mysqlnd) introduced?

Question 4 of 39
★ FPSC ★ PPSC

Which one of the following statements instantiates the mysqli class?

Question 5 of 39
★ FPSC ★ PPSC

Which one of the following methods can be used to diagnose and display information about a MySQL connection error?

Question 6 of 39
★ FPSC ★ PPSC

Which method returns the error code generated from the execution of the last MySQL function?

Question 7 of 39
★ FPSC ★ PPSC

Which one of the following statements should be used to include a file?

Question 8 of 39
★ FPSC ★ PPSC

Which one of the following methods is responsible for sending the query to the database?

Question 9 of 39
★ FPSC ★ PPSC

Which one of the following methods recuperates any memory consumed by a result set?

Question 10 of 39
★ FPSC ★ PPSC

Which of the methods are used to manage result sets using both associative and indexed arrays?

Question 11 of 39
★ FPSC ★ PPSC

Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?

Question 12 of 39
★ FPSC ★ PPSC

Which version of MySQL introduced the prepared statements?

Question 13 of 39
★ FPSC ★ PPSC

Which of the following methods is used to execute the statement after the parameters have been bound?

Question 14 of 39
★ FPSC ★ PPSC

Which one of the following methods is used to recuperating prepared statements resources?

Question 15 of 39
★ FPSC ★ PPSC

Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?

Question 16 of 39
★ FPSC ★ PPSC

Which method rolls back the present transaction?

Question 17 of 39
★ FPSC ★ PPSC

When you are building administrative links you’ll need to accept two arguments, which of the following are they?

Question 18 of 39
★ FPSC ★ PPSC

Once your application can generate administrative links, you need to load those links into _________

Question 19 of 39
★ FPSC ★ PPSC

The URLs in the administrative links won’t mean anything to admin.php unless you modify _________

Question 20 of 39
★ FPSC ★ PPSC

The (|/) tells the server to match ___________

Question 21 of 39
★ FPSC ★ PPSC

([w-]+) will match ___________

Question 22 of 39
★ FPSC ★ PPSC

You need to check whether ______ is set, to determine whether you’re editing an entry or creating a new one.

Question 23 of 39
★ FPSC ★ PPSC

To identify entries marked for deletion, you check whether $_GET[‘page’] == ‘delete’ inside __________

Question 24 of 39
★ FPSC ★ PPSC

Your confirmation form submits your choice, via the _______ method, to ________

Question 25 of 39
★ FPSC ★ PPSC

When a user confirms that he wishes to delete an entry, that entry’s URL is passed to a function which removes the entry from the __________

Question 26 of 39
★ FPSC ★ PPSC

Which one of the following databases has PHP supported almost since the beginning?

Question 27 of 39
★ FPSC ★ PPSC

Which one of the following statements is used to create a table?

Question 28 of 39
★ FPSC ★ PPSC

Which one of the following statements can be used to select the database?

Question 29 of 39
★ FPSC ★ PPSC

If there is no error, then what will the error() method return?

Question 30 of 39
★ FPSC ★ PPSC

Which of the following DBMSs do not have a native PHP extension?

Question 31 of 39
★ FPSC ★ PPSC

In PHP in order to access MySQL database you will use:

Question 32 of 39
★ FPSC ★ PPSC

Transactions are used to treat sets of SQL statements atomically.

Question 33 of 39
★ FPSC ★ PPSC

SQL is not case sensitive. SELECT is the same as select.

Question 34 of 39
★ FPSC ★ PPSC

Which of the following is not an SQL aggregate function?

Question 35 of 39
★ FPSC ★ PPSC

What does the DESC keyword do in the following query? SELECT * FROM MY_TABLE WHERE ID > 0 ORDER BY ID, NAME DESC"

Question 36 of 39
★ FPSC ★ PPSC

The ............. statement is used to delete a table.

Question 37 of 39
★ FPSC ★ PPSC

What will happen at the end of the following sequence of SQL commands? BEGIN TRANSACTION DELETE FROM MYTABLE WHERE ID=1 DELETE FROM OTHERTABLE ROLLBACK TRANSACTION

Question 38 of 39
★ FPSC ★ PPSC

Use the .............. to delete the data inside the table, and not the table itself?

Question 39 of 39
★ FPSC ★ PPSC

Can joins be nested?

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →