SQLite Interview Questions and Answers
Ques 26. Explain the purpose of the VACUUM command in SQLite.
The VACUUM command in SQLite is used to rebuild the database file, optimizing storage and improving performance by cleaning up free space.
Ques 27. What is the purpose of the ORDER BY clause in SQLite?
The ORDER BY clause in SQLite is used to sort the result set of a query in ascending or descending order based on one or more columns.
Ques 28. Explain the difference between INNER JOIN and LEFT JOIN in SQLite.
INNER JOIN returns only the matching rows from both tables, while LEFT JOIN returns all rows from the left table and the matching rows from the right table, filling in with NULLs for non-matching rows.
Ques 29. How to add a new column to an existing table in SQLite?
You can add a new column to an existing table in SQLite using the ALTER TABLE statement: `ALTER TABLE table_name ADD COLUMN column_name data_type;`.
Ques 30. Explain the purpose of the HAVING clause in SQLite.
The HAVING clause in SQLite is used to filter the results of a GROUP BY clause based on specified conditions, similar to the WHERE clause for individual rows.
Most helpful rated by users: