Web Application Development MCQs with Answers
Practice important Web Application Development MCQs with answers and explanations.
Multiple Choice Questions
Q131: Fill in the blank: The mysqli_connect() function is used to _______.
- A: create a new database
- B: connect to a MySQL database
- C: create a table in a database
- D: insert data into a table
View Answer
B
Q132: What attribute in MySQL is used to ensure a column value is unique for each row?
- A: AUTO_INCREMENT
- B: UNIQUE
- C: NOT NULL
- D: PRIMARY KEY
View Answer
B
Q133: Fill in the blank: The mysqli_prepare() function is used to _______.
- A: create a table
- B: execute an SQL statement
- C: prepare an SQL statement
- D: retrieve data from a table
View Answer
C
Q134: Which function is used to execute an SQL statement that includes multiple queries?
- A: mysqli_query()
- B: mysqli_execute()
- C: mysqli_multi_query()
- D: mysqli_run()
View Answer
C
Q135: Fill in the blank: To specify that a column should automatically increment, use the _______ attribute.
- A: AUTO_INCREMENT
- B: TIMESTAMP
- C: UNIQUE
- D: PRIMARY KEY
View Answer
A
Q136: What does the SELECT * FROM table_name statement do in MySQL?
- A: Selects all columns from a table
- B: Updates all records in a table
- C: Deletes all records from a table
- D: Creates a new table
View Answer
A
Q137: Fill in the blank: The SQL DELETE FROM table_name WHERE some_column = some_value statement is used to _______.
- A: select records
- B: update records
- C: delete records
- D: create records
View Answer
C
Q138: Which SQL statement is used to modify existing records in a table?
- A: DELETE
- B: INSERT
- C: UPDATE
- D: CREATE
View Answer
C
Q139: Fill in the blank: The mysqli_fetch_assoc() function is used to _______.
- A: insert data into a table
- B: fetch a result row as an associative array
- C: delete records from a table
- D: update records in a table
View Answer
B
Q140: What is the purpose of the WHERE clause in SQL statements?
- A: To limit the number of records returned
- B: To specify which records to select
- C: To delete all records from a table
- D: To update the structure of a table
View Answer
B