SQLite Database
SQLite Database
Here are 50 multiple-choice questions with answers related to listing tables and indices in
an SQLite database:
1. Which SQL statement can be used to list all tables in an SQLite database?
2. In SQLite, the system catalog table that stores information about database objects is called:
Answer: c) sqlite_master;
3. Which SQLite command-line tool command is used to list all tables in a database?
Answer: c) .tables;
4. How can you obtain a list of tables using the SQLite C/C++ API?
5. To list all indices in an SQLite database, which SQL statement would you use?
6. In SQLite, the system catalog table that stores information about indices is called:
Answer: c) sqlite_master;
7. Which SQLite command-line tool command is used to list all indices in a database?
Answer: c) .indices;
8. How can you obtain a list of indices using the SQLite C/C++ API?
9. Which of the following is a valid SQL statement to list all tables and indices in an SQLite database?
Answer: c) SELECT name, type FROM sqlite_master WHERE type IN ('table', 'index');
10. In SQLite, which pragma statement can be used to list all table names in a database?
Answer: b) PRAGMA table_info(table_name);
11. To list all tables and their corresponding schemas, you can use:
12. Which of the following SQLite commands can be used to list all table names in a database?
Answer: a) .tables;
13. How can you obtain a list of tables and their schemas using the SQLite C/C++ API?
14. Which SQLite command-line tool command is used to list all tables and their schemas in a
database?
Answer: a) .schema;
15. In SQLite, which pragma statement can be used to list all index names in a database?
16. To list all indices and their corresponding tables in an SQLite database, you can use:
17. Which of the following SQLite commands can be used to list all index names in a database?
Answer: c) .indices;
18. How can you obtain a list of indices and their corresponding tables using the SQLite C/C++ API?
19. Which SQLite command-line tool command is used to list all indices and their corresponding
tables in a database?
Answer: c) .indices;
20. In SQLite, which pragma statement can be used to list all column names of a table?
Answer: b) PRAGMA table_info(table_name);
21. To list all columns of a table in an SQLite database, you can use:
22. Which of the following SQLite commands can be used to list all column names of a table?
23. How can you obtain a list of column names of a table using the SQLite C/C++ API?
24. Which SQLite command-line tool command is used to list all column names of a table?
25
. In SQLite, which pragma statement can be used to retrieve the SQL CREATE statement for a specific
table?
26. To obtain the SQL CREATE statement for a specific table in an SQLite database, you can use:
27. Which of the following SQLite commands can be used to retrieve the SQL CREATE statement for a
specific table?
28. How can you obtain the SQL CREATE statement for a specific table using the SQLite C/C++ API?
29. Which SQLite command-line tool command is used to retrieve the SQL CREATE statement for a
specific table?
Answer: a) .schema table_name;
30. In SQLite, which pragma statement can be used to retrieve the SQL CREATE statement for a
specific index?
31. To obtain the SQL CREATE statement for a specific index in an SQLite database, you can use:
32. Which of the following SQLite commands can be used to retrieve the SQL CREATE statement for a
specific index?
33. How can you obtain the SQL CREATE statement for a specific index using the SQLite C/C++ API?
34. Which SQLite command-line tool command is used to retrieve the SQL CREATE statement for a
specific index?
35. In SQLite, which pragma statement can be used to retrieve the column names and types of a
table?
36. To obtain the column names and types of a table in an SQLite database, you can use:
37. Which of the following SQLite commands can be used to retrieve the column names and types of
a table?
38. How can you obtain the column names and types of a table using the SQLite C/C++ API?
40. In SQLite, which pragma statement can be used to retrieve the table's primary key column(s)?
41. To obtain the primary key column(s) of a table in an SQLite database, you can use:
42. Which of the following SQLite commands can be used to retrieve the table's primary key
column(s)?
43. How can you obtain the primary key column(s) of a table using the SQLite C/C++ API?
44. Which SQLite command-line tool command is used to retrieve the table's primary key column(s)?
45. In SQLite, which pragma statement can be used to retrieve the foreign key information of a table?
46. To obtain the foreign key information of a table in an SQLite database, you can use:
47. Which of the following SQLite commands can be used to retrieve the foreign key information of a
table?
49. Which SQLite command-line tool command is used to retrieve the foreign key information of a
table?
50. In SQLite, which pragma statement can be used to retrieve the SQL CREATE statement for a
specific view?