PHP Interview Questions

Laravel Interview Questions

MySQL Interview Questions

What is the purpose of the 'HAVING' clause?

Show Answer
Correct Answer: A - To filter records after aggregation has been performed.

What does the 'INDEX' keyword do in MySQL?

Show Answer
Correct Answer: B - It improves the speed of data retrieval operations.

What are stored procedures in MySQL?

Show Answer
Correct Answer: B - A set of SQL statements that can be stored and reused.

What does the 'CRUD' acronym stand for in database operations?

Show Answer
Correct Answer: A - Create, Read, Update, Delete.

What is the difference between 'INNER JOIN' and 'LEFT JOIN' in MySQL?

Show Answer
Correct Answer: B - LEFT JOIN returns all records from the left table and matched records from the right table.

What is the purpose of the 'HAVING' clause in MySQL?

Show Answer
Correct Answer: B - To filter records after grouping.

What is the significance of the 'AUTO_INCREMENT' attribute in MySQL?

Show Answer
Correct Answer: A - It automatically generates a unique value for a column when a new record is inserted.

What does the 'GROUP BY' clause do in a SQL query?

Show Answer
Correct Answer: A - It groups rows that have the same values in specified columns into summary rows.

What does the 'LIMIT' clause do in a SQL query?

Show Answer
Correct Answer: A - It restricts the number of rows returned by the query.

What is the function of the 'INDEX' in MySQL?

Show Answer
Correct Answer: A - To speed up the retrieval of rows from a table.

What is the difference between 'CHAR' and 'VARCHAR' data types in MySQL?

Show Answer
Correct Answer: A - CHAR is fixed-length, while VARCHAR is variable-length.