SQLite is a database engine written in the C language. It is not a standalone app; rather, it is a library (a self-contained, serverless, zero-configuration) that software developers embed in their apps. As such, it belongs to the family of embedded databases.
SQLite MCQs: This section contains multiple-choice questions and answers on the SQLite. It will help the students to test their skills and prepare well for their exams.
List of SQLite MCQs
1. The SQLite database management system is an ____ database.
- Embedded relational
- Non-embedded relational
- Non-relational
- Structural
Answer: A) Embedded relational
Explanation:
The SQLite database management system is an embedded relational database.
2. The SQLite database engine is ____. It is self-contained and no configuration is required.
- Serverless
- Transactional
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The SQLite database engine is serverless and transactional. It is self-contained and no configuration is required.
3. An ____, self-contained, stand-alone, transactional relational database engine, SQLite is designed to be embedded within an application without requiring additional configuration.
- Open-source
- Closed-source
- Open-end
- Open-wire
Answer: A) Open-source
Explanation:
An open-source, self-contained, stand-alone, transactional relational database engine, SQLite is designed to be embedded within an application without requiring additional configuration.
4. SQLite differs from most other SQL databases because it is based on a server process instead of a ____ server.
- Unique
- Mixed
- Configured
- Separate
Answer: D) Separate
Explanation:
SQLite differs from most other SQL databases because it is based on a server process instead of a separate server.
5. In SQLite, files are ____ directly to disk.
- Read
- Written
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
In SQLite, files are read and written directly to disk.
6. Typically, a single disk file contains the entire SQL database, including ____ and views.
- Tables
- Indices
- Triggers
- All of the above
Answer: D) All of the above
Explanation:
Typically, a single disk file contains the entire SQL database, including tables, indices, triggers, and views.
7. SQLite is written in –
- C
- C#
- C++
- ANSI-C
Answer: D) ANSI-C
Explanation:
SQLite is written in ANSI-C.
8. SQLite is –
- Data-based
- File-based
- Structure-based
- None of the above
Answer: B) File-based
Explanation:
SQLite is File-based.
9. SQLite supports many of the features of SQL and is fast; however, ____ procedures are not supported.
- Stored
- Bypass
- Failed
- Transactional
Answer: A) Stored
Explanation:
SQLite supports many of the features of SQL and is fast; however, stored procedures are not supported.
10. SQLite is a ____ database resource.
- Interface
- Non-interface
- Portable
- Non-portable
Answer: C) Portable
Explanation:
SQLite is a non-portable database resource.
11. For your programming language to access that database, you’ll need an SQLite ____.
- Powerplug
- Extension
- Structure
- Database
Answer: B) Extension
Explanation:
For your programming language to access that database, you’ll need an SQLite extension.
12. In contrast with other database management systems like SQL Server or Oracle, SQLite is very small (less than ____ in size).
- 200 kb
- 500 kb
- 1000 kb
- 1 MB
Answer: B) 500 kb
Explanation:
In contrast with other database management systems like SQL Server or Oracle, SQLite is very small (less than 500 Kb in size).
13. What is/are the feature(s) of SQLite?
- Totally free
- Serverless
- Very flexible
- All of the above
Answer: D) All of the above
Explanation:
The features of SQLite are –
- Totally free
- Serverless
- Very flexible
14. What is not the feature of SQLite?
- Configuration Not Required
- Storage of data is tough
- Variable length of columns
- Cross-platform DBMS
Answer: B) Storage of data is tough
Explanation:
Storage of data is easy in SQLite.
15. ____ databases can be accessed simultaneously with SQLite in the same session.
- Two
- Three
- Four
- Multiple
Answer: D) Multiple
Explanation:
Multiple databases can be accessed simultaneously with SQLite in the same session.
16. Several programming languages support SQLite’s API such as –
- PHP
- Java
- Python
- All of the above
Answer: D) All of the above
Explanation:
Several programming languages support SQLite’s API such as PHP, Java, Python, etc.
17. SQLite is available on –
- Windows
- Linux
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
SQLite is available on Windows and Linux.
18. In addition to version control systems, financial analysis tools, media cataloging and editing suites, CAD packages, and record keeping programs, SQLite has been used successfully in many desktop applications as well as ____ file formats.
- On-disk
- Off-disk
- Disk
- None
Answer: A) On-disk
Explanation:
In addition to version control systems, financial analysis tools, media cataloging, and editing suites, CAD packages, and record-keeping programs, SQLite has been used successfully in many desktop applications as well as on-disk file formats.
19. What is/are the advantage(s) of SQLite?
- Lightweight
- Better Performance
- No Installation Needed
- All of the above
Answer: D) All of the above
Explanation:
The advantages of SQLite are –
- Lightweight
- Better Performance
- No Installation Needed
20. In addition to being a very light weight database, SQLite can be easily integrated into devices such as ____, home electronic devices, and so forth.
- Televisions
- Mobile Phones
- Cameras
- All of the above
Answer: D) All of the above
Explanation:
In addition to being a very light weight database, SQLite can be easily integrated into devices such as televisions, mobile phones, cameras, home electronic devices, and so forth.
21. As SQLite databases are almost ____ faster than the File system, reading and writing operations are very fast.
- 10%
- 35%
- 65%
- 95%
Answer: B) 35%
Explanation:
As SQLite databases are almost 35% faster than the File system, reading and writing operations are very fast.
22. Instead of reading the whole file and storing it in memory, SQLite only ____ the data that is needed.
- Adds
- Restores
- Loads
- Deletes
Answer: C) Loads
Explanation:
Instead of reading the whole file and storing it in memory, it only loads the data that is needed.
23. When you edit small segments of the file, SQLite ____ only the portions that have been edited.
- Writes
- Rewrites
- Overwrites
- None
Answer: C) Overwrites
Explanation:
When you edit small segments of the file, it overwrites only the portions that have been edited.
24. Which of the following is TRUE about the reliability of SQLite?
- Your content is continuously updated, so when the power goes out or the computer crashes, little or no work is lost.
- I/O code written in SQLite is less likely to be bug-prone than custom-written code.
- In contrast to procedural code, SQLite queries are smaller, so the chances of a bug occurring are lower.
- All of the above
Answer: D) All of the above
Explanation:
The following is TRUE about the reliability of SQLite –
- Your content is continuously updated, so when the power goes out or the computer crashes, little or no work is lost.
- I/O code written in SQLite is less likely to be bug-prone than custom-written code.
- In contrast to procedural code, SQLite queries are smaller, so the chances of a bug occurring are lower.
25. This open-source database management system is compatible with both big- and little-endian architectures, including ____ operating systems.
- 32-bit
- 64-bit
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
This open-source database management system is compatible with both big- and little-endian architectures, including 32-bit and 64-bit operating systems.
26. The same application file can be accessed and written by ____ processes without interfering with one another.
- Two
- Three
- Five
- Multiple
Answer: D) Multiple
Explanation:
The same application file can be accessed and written by multiple processes without interfering with one another.
27. Which of the following is TRUE about the portability of SQLite?
- There is one compatibility issues with any of the programming languages
- There are two compatibility issues with any of the programming languages
- There are no compatibility issues with any of the programming languages
- There are multiple compatibility issues with any of the programming languages
Answer: C) There are no compatibility issues with any of the programming languages
Explanation:
There are no compatibility issues with any of the programming languages.
28. What is TRUE about accessibility of SQLite?
- A number of third-party tools are available for accessing the SQLite database
- There is a greater likelihood of recovering content from a SQLite database if it has been lost
- Code is short-lived compared to data
- All of the above
Answer: D) All of the above
Explanation:
In case of accessibility of SQLite –
- A number of third-party tools are available for accessing the SQLite database.
- There is a greater likelihood of recovering content from a SQLite database if it has been lost.
- Code is short-lived compared to data.
29. Because SQLite allows access to and update content in a concise manner rather than through lengthy and error-prone procedural queries, it reduces the application’s ____.
- Cost
- Size
- Storage
- Fields
Answer: A) Cost
Explanation:
Because SQLite allows access to and update content in a concise manner rather than through lengthy and error-prone procedural queries, it reduces the application’s cost.
30. What is TRUE about reducing the cost and complexity in SQLite?
- With the addition of new tables and/or columns, SQLite can easily be extended in the future
- Backward compatibility is also preserved
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
In case of reducing the cost and complexity in SQLite –
- With the addition of new tables and/or columns, SQLite can easily be extended in the future.
- Backward compatibility is also preserved.
31. HTTP requests with _____ traffic is/are handled by SQLite.
- Low
- Medium
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
HTTP requests with low to medium traffic are handled by SQLite.
32. Most databases have a size limit of ____.
- 2 KB
- 2 MB
- 2 GB
- 2 TB
Answer: C) 2 GB
Explanation:
Most databases have a size limit of 2 GB.
33. With SQLite, there is no ____ required, making it an excellent choice for small businesses.
- Configuration
- Administration
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
With SQLite, there is no configuration or administration required, making it an excellent choice for small businesses.
34. How many types of SQLite commands are there?
- 1
- 2
- 3
- 4
Answer: C) 3
Explanation:
There are 3 types of SQLite commands.
35. Which of the following is/are SQLite command(s)?
- DDL
- DML
- DQL
- All of the above
Answer: D) All of the above
Explanation:
The following are the SQLite commands –
- DDL
- DML
- DQL
36. What is the full form of DQL?
- Data Quantization Language
- Data Query Language
- Data Qualcomm Language
- Data Quarter Language
Answer: B) Data Query Language
Explanation:
The full form of DQL is Data Query Language.
37. How many commands are there in DDL?
- 1
- 2
- 3
- 4
Answer: C) 3
Explanation:
There are 3 commands in DDL.
38. Which of the following is/are the DDL command(s)?
- CREATE
- ALTER
- DROP
- All of the above
Answer: D) All of the above
Explanation:
The following are the DDL commands –
- CREATE
- ALTER
- DROP
39. The CREATE command creates ____ in the database.
- Tables
- Views of tables
- Other objects
- All of the above
Answer: D) All of the above
Explanation:
The CREATE command creates tables, views of tables, and other objects in the database.
40. A table can be ____ with the ALTER command.
- Created
- Modified
- Recreated
- Deleted
Answer: B) Modified
Explanation:
A table can be modified with the ALTER command.
41. You can delete a whole table, a view of a table, or any other object within a database by using the ____ command.
- DELETE
- DROP
- REMOVE
- None
Answer: B) DROP
Explanation:
You can delete a whole table, a view of a table, or any other object within a database by using the DROP command.
42. How many commands are there in DML?
- 1
- 2
- 3
- 4
Answer: C) 3
Explanation:
There are 3 commands in DML.
43. Which of the following is/are the command(s) in DML?
- INSERT
- UPDATE
- DELETE
- All of the above
Answer: D) All of the above
Explanation:
The following are the commands in DML –
- INSERT
- UPDATE
- DELETE
44. How many commands are there in DQL?
- 1
- 2
- 3
- 4
Answer: A) 1
Explanation:
There is 1 command in DQL.
45. SQLite dot commands are not terminated by –
- Colon (:)
- Semicolon (;)
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
SQLite dot commands are not terminated by Colon(:) and Semicolon(;).
46. What does .backup ?db? File command do?
- It takes DB(default “main”) backup to file
- It takes file backup to file
- It takes file backup to DB(default “main”)
- It takes DB(default “main”) backup to DB
Answer: A) It takes DB(default “main”) backup to file
Explanation:
.backup ?db? File command takes the backup DB(default “main”) to file.
47. What does .bail on|off command do?
- It stops after hitting an error. default off
- It starts after hitting an error
- It stops after switching off
- It defaults to off
Answer: A) It stops after hitting an error. default off
Explanation:
.bail on|off command stops after hitting an error. default off.
48. What does .databases command do?
- It removes files of attached databases
- It adds files of attached databases
- It lists names and files of attached databases
- It alter names and files of attached database
Answer: C) It lists names and files of attached databases
Explanation:
.databases command lists names and files of attached databases.
49. Does .dump ?table? command do?
- Databases are dumped in SQLite format
- Databases are dumped in SQL text format
- Databases are dumped in PL/SQL format
- Databases are dumped in SQL image format
Answer: B) Databases are dumped in SQL text format
Explanation:
In .dump ?table? Command, the databases are dumped in SQL text format.
50. What does .echo on|off command do?
- It turns the echo command on
- It turns the echo command off
- It turns the echo command on or off
- None of the above
Answer: C) It turns the echo command on or off
Explanation:
.echo on|off command turns the echo command on or off.
51. What does .exit command do?
- It exits the sql prompt
- It exits the sqlite prompt
- It exits the PL/SQL prompt
- None of the above
Answer: B) It exits the sqlite prompt
Explanation:
The .exit command exits the sqilte prompt.
52. What does .explain on|off command do?
- Switches between input modes suitable for explaining and non-explaining
- Switches between output modes suitable for explaining
- Switches between output modes suitable for non-explaining
- Switches between output modes suitable for explaining and non-explaining
Answer: D) Switches between output modes suitable for explaining and non-explaining
Explanation:
The .explain on|off command switches between output modes suitable for explaining and non-explaining.
53. What does .header(s) on|off command do?
- Display of headers are turned on
- Display of headers are turned off
- Display of headers are turned on or off
- None of the above
Answer: C) Display of headers are turned on or off
Explanation:
In the case of .header(s) on|off command, the display of headers are turned on or off.
54. What does .import file table command do?
- It imports the data from table into file
- It imports the data from file into table
- It exports the data from table into file
- It exports the data from file into table
Answer: B) It imports the data from file into table
Explanation:
The .import file command imports the data from file into table.
55. What does .indices ?table? command do?
- It shows the name of all indices
- It changes the name of all indices
- It adds the name of new indices
- It deletes the name of indices
Answer: A) It shows the name of all indices
Explanation:
The .indices ?table? command shows the name of all indices.
56. What does .load file ?entry? command do?
- It loads an extension file
- It loads an extension entry
- It loads an extension library
- None of the above
Answer: C) It loads an extension entry
Explanation:
The .load file ?entry? command loads an extension library.
57. What does .log file|off command do?
- It turns the logging on
- It turns the logging off
- It turns the logging on or off
- None of the above
Answer: C) It turns the logging on or off
Explanation:
The .load file ?entry? Command turns the logging on or off.
58. What does .nullvalue string command do?
- In place of null values, it prints not null values
- In place of null values, it prints string
- In place of not null values, it prints null values
- In place of not null values, it prints string
Answer: B) In place of null values, it prints string
Explanation:
The .nullvalue string command print string in place of null values.
59. What does .output filename command do?
- It sends output to filename
- It sends input to filename
- It sends filename to output
- It sends filename to input
Answer: A) It sends output to filename
Explanation:
The .output filename command send output to filename.
60. What does .output stdout command do?
- It sends input to the screen
- It sends output to the screen
- It sends screen to the input
- It sends screen to the output
Answer: B) It sends output to the screen
Explanation:
The .output stdout command send output to the screen.
61. What does .print string… command do?
- It prints normal string
- It prints literal string
- It prints sequential string
- It prints consecutive string
Answer: B) It prints literal string
Explanation:
The .print string… command prints literal string.
62. What does .prompt main continue command do?
- It adds main prompts
- It continues with main prompts
- It replaces standard prompts
- It replaces main prompts
Answer: C) It replaces standard prompts
Explanation:
The .prompt main continue command replaces the standard prompts.
63. What does .quit command do?
- It enters sqlite prompt
- It exits sqlite prompt
- It quits sqlite
- None of the above
Answer: B) It exits sqlite prompt
Explanation:
The .quit command exits sqlite prompt.
64. What does .read filename command do?
- It executes read in filename
- It executes write in filename
- It executes sql in filename
- It stops sql in filename
Answer: C) It executes sql in filename
Explanation:
The .read filename command executes sql in filename.
65. What does .schema ?table? Command do?
- It shows the CREATE statements
- It shows the UPDATE statements
- It shows the INSERT statements
- It shows the DELETE statements
Answer: B) It shows the UPDATE statements
Explanation:
The .schema ?table? Command shows the CREATE statement.
66. What happens when the table is specified in the .schema ?table? Command?
- Tables not matching the specified pattern will only be displayed if the table is specified
- Tables matching the specified pattern will only be displayed if the table is specified
- Tables matching the different pattern will only be displayed if the table is specified
- Tables matching the specialized pattern will only be displayed if the table is specified
Answer: B) Tables matching the specified pattern will only be displayed if the table is specified
Explanation:
Tables matching the specified pattern will only be displayed if the table is specified.
67. What does .separate string command do?
- In output mode and .import, it displays the separator used
- In output mode and .import, it changes the separator used
- In output mode and .import, it adds the separator used
- In output mode and .import, it removes the separator used
Answer: B) In output mode and .import, it changes the separator used
Explanation:
The .separate string command changes the separator used in output mode and .import.
68. What does .show command do?
- Current values are shown for various settings
- Current values are revoked for various settings
- Current values are changed for various settings
- Current values are deleted for various settings
Answer: A) Current values are shown for various settings
Explanation:
Current values are shown for various settings in case of .show command.
69. What does .stats on|off command do?
- It turns the stats on
- It turns the stats off
- It turns the stats on or off
- It turns the stats deadlocked
Answer: C) It turns the stats on or off
Explanation:
The .stats on|off command turns the stats on or off.
70. What does .tables ?pattern? Command do?
- Tables matching a pattern are listed
- Tables not matching a pattern are listed
- Tables matching a pattern are revoked
- Tables not matching a pattern are revoked
Answer: A) Tables matching a pattern are listed
Explanation:
Tables matching a pattern are listed in case of .tables ?pattern? Command.
71. What does .timeout ms command do?
- For ms seconds, it tries to open locked tables
- For ms milliseconds, it tries to open locked tables
- For ms microseconds, it tries to open locked tables
- For ms average seconds, it tries to open locked tables
Answer: B) For ms milliseconds, it tries to open locked tables
Explanation:
For ms milliseconds, .timeout ms command tries to open locked tables.
72. What does .width num num command do?
- For “column” mode, it sets column widths
- For “row” mode, it sets column widths
- For “column” mode, it sets row widths
- For “row” mode, it sets row widths
Answer: A) For “column” mode, it sets column widths
Explanation:
For “column” mode, .widht num num command sets column widths.
73. What does .timer on|off command do?
- Activates CPU timer measurement
- Deactivates CPU timer measurement
- Activates or deactivates CPU timer measurement
- None of the above
Answer: C) Deactivates CPU timer measurement
Explanation:
The .timer on|off command activates or deactivates CPU timer measurement.
74. What dot command(s) is/are used to format the output?
- .header on
- .mode column
- .timer on
- All of the above
Answer: D) All of the above
Explanation:
Dot commands that are used to format the output are –
- .header on
- .mode column
- .timer on
75. Based on case-sensitivity, SQLite is –
- Case sensitive
- Not case sensitive
- Not case sensitive with few commands being case sensitive
- None of the above
Answer: C) Not case sensitive with few commands being case sensitive
Explanation:
SQLite is not case sensitive with few commands being case sensitive.
76. Which of the following command(s) is/are case sensitive in SQLite?
- GLOB
- Glob
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The following commands are case sensitive in SQLite – GLOB and glob as they have different meanings.
77. Which of the following is/are TRUE about Comments in SQLite?
- You can add comments to your SQLite code to make it more readable.
- Nesting is not possible
- Two consecutive “-” characters begin a comment.
- All of the above
Answer: D) All of the above
Explanation:
The following are TRUE about Comments in SQLite –
- You can add comments to your SQLite code to make it more readable.
- Nesting is not possible
- Two consecutive “-” characters begin a comment.
78. Comment can also appear with –
- /*
- */
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
Comment can also appear with /* and */ as they form a character pair.
79. All the SQLite statements end with a –
- ;
- :
- !
- )
Answer: A) ;
Explanation:
All the SQLite statements ends with a Semicolon (;).
80. Which of the following is/are the syntax of ANALYZE statement?
- ANALYZE;
- ANALYZE database_name;
- ANALYZE database_name.table_name;
- All of the above
Answer: D) All of the above
Explanation:
The following are the syntax of ANALYZE statement –
- ANALYZE;
- ANALYZE database_name;
- ANALYZE database_name.table_name;
81. What is the syntax of ALTER TABLE statement (Rename)?
- ALTER TABLE table_name RENAME FOR new_table_name;
- ALTER TABLE table_name RENAME OF new_table_name;
- ALTER TABLE table_name RENAME TO new_table_name;
- ALTER TABLE table_name RENAME FROM new_table_name;
Answer: C) ALTER TABLE table_name RENAME TO new_table_name;
Explanation:
The syntax of ALTER TABLE statement (Rename) is ALTER TABLE table_name RENAME TO new_table_name;
82. What is the syntax of SQLite ATTACH DATABASE statement?
- ATTACH DATABASE ‘DatabaseName’ As ‘Alias-Name’;
- ATTACH DATABASE ‘DatabaseName’ For ‘Alias-Name’;
- ATTACH DATABASE ‘DatabaseName’ Of ‘Alias-Name’;
- ATTACH DATABASE ‘DatabaseName’ To ‘Alias-Name’;
Answer: A) ATTACH DATABASE ‘DatabaseName’ As ‘Alias-Name’;
Explanation:
The syntax of SQLite ATTACH DATABASE statement is ATTACH DATABASE ‘DatabaseName’ As ‘Alias-Name’;
83. What is/are the syntax of BEGIN TRANSACTION statement?
- BEGIN;
- BEGIN EXCLUSIVE TRANSACTION;
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The syntax of BEGIN TRANSACTION statement are –
- BEGIN;
- BEGIN EXCLUSIVE TRANSACTION;
84. What is the syntax of CREATE INDEX statement?
- CREATE INDEX index_name OF table_name ( column_name COLLATE NOCASE );
- CREATE INDEX index_name ON table_name ( column_name COLLATE NOCASE );
- CREATE INDEX index_name AT table_name ( column_name COLLATE NOCASE );
- CREATE INDEX index_name AS table_name ( column_name COLLATE NOCASE );
Answer: B) CREATE INDEX index_name ON table_name ( column_name COLLATE NOCASE );
Explanation:
The syntax of CREATE INDEX statement is CREATE INDEX index_name ON table_name ( column_name COLLATE NOCASE );.
85. What is the syntax of CREATE UNIQUE INDEX statement?
- CREATE INDEX index_name ON table_name ( column1, column2,…columnN);
- CREATE UNIQUE INDEX index_name AS table_name ( column1, column2,…columnN);
- CREATE UNIQUE INDEX index_name ON table_name ( column_name COLLATE NOCASE );
- CREATE UNIQUE INDEX index_name ON table_name ( column1, column2,…columnN);
Answer: D) CREATE UNIQUE INDEX index_name ON table_name ( column1, column2,…columnN);
Explanation:
The syntax of CREATE UNIQUE INDEX statement is:
CREATE UNIQUE INDEX index_name ON table_name ( column1, column2,…columnN);
86. What is the syntax of CREATE VIEW statement?
- CREATE VIEW database_name.view_name AT SELECT statement…;
- CREATE VIEW database_name.view_name ON SELECT statement…;
- CREATE VIEW database_name.view_name AS SELECT statement…;
- CREATE VIEW database_name.view_name FOR SELECT statement…;
Answer: C) CREATE VIEW database_name.view_name AS SELECT statement…;
Explanation:
The syntax of CREATE VIEW statement is:
CREATE VIEW database_name.view_name AS SELECT statement …;
87. What is/are the syntax of CREATE VIRTUAL TABLE statement?
- CREATE VIRTUAL TABLE database_name.table_name USING weblog( access.log );
- CREATE VIRTUAL TABLE database_name.table_name USING fts3( );
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The syntax of CREATE VIRTUAL TABLE statement are –
- CREATE VIRTUAL TABLE database_name.table_name USING weblog( access.log );
- CREATE VIRTUAL TABLE database_name.table_name USING fts3( );
88. What is the syntax of SQLite COUNT Clause?
- SELECT COUNT(column_name)
WHERE CONDITION; - SELECT COUNT(column_name)
FROM database_name
WHERE CONDITION; - SELECT COUNT(column_name)
FROM table_name
NULL CONDITION; - SELECT COUNT(column_name)
FROM table_name
WHERE CONDITION;
Answer: D)
SELECT COUNT(column_name)
FROM table_name
WHERE CONDITION;
Explanation:
The syntax of SQLite COUNT clause is –
SELECT COUNT(column_name)
FROM table_name
WHERE CONDITION;
89. What is the syntax of SQLite DELETE statement?
- DROP FROM table_name WHERE {CONDITION};
- DELETE OF table_name WHERE {CONDITION};
- DELETE TO table_name WHERE {CONDITION};
- DELETE FROM table_name WHERE {CONDITION};
Answer: D) DELETE FROM table_name WHERE {CONDITION};
Explanation:
The syntax of SQLite DELETE statement is:
DELETE FROM table_name WHERE {CONDITION};
90. What is the syntax of SQLite DETACH DATABASE statement?
- ATTACH DATABASE ‘Alias-Name’;
- DETACH TABLE ‘Alias-Name’;
- DETACH DATABASE ‘Alias-Name’;
- DETACH DATABASE;
Answer: C) DETACH DATABASE ‘Alias-Name’;
Explanation:
The syntax of SQLite DETACH DATABASE statement is:
DETACH DATABASE ‘Alias-Name’;
91. What is the syntax of SQLite DISTINCT Clause?
- SELECT DISTINCT column1, column2….columnN
OF table_name; - SELECT DISTINCT column1, column2….columnN
FROM table_name; - SELECT column1, column2….columnN
FROM table_name; - SELECT column1, column2….columnN
OF table_name;
Answer: B)
SELECT DISTINCT column1, column2….columnN
FROM table_name;
Explanation:
The syntax of SQLite DISTINCT Clause is –
SELECT DISTINCT column1, column2….columnN
FROM table_name;
92. What is the syntax of SQLite DROP INDEX statement?
- DELETE INDEX database_name.index_name;
- DROP INDEX database_name.index_name;
- DROP INDEX index_name.index_name;
- DROP INDEX index_name.database_name;
Answer: B) DROP INDEX database_name.index_name;
Explanation:
The syntax of SQLite DROP INDEX statement is:
DROP INDEX database_name.index_name;
93. What is the syntax of SQLite DROP TABLE statement?
- DROP TABLE database_name.table_name;
- DROP TABLE database_name;
- DROP TABLE table_name;
- DELETE TABLE database_name.table_name;
Answer: A) DROP TABLE database_name.table_name;
Explanation:
The syntax of SQLite DROP TABLE statement is:
DROP TABLE database_name.table_name;
94. What is the syntax of DROP VIEW statement?
- DROP VIEW database_name.view_name;
- DROP VIEW view_name;
- DROP INDEX database_name;
- DROP INDEX database_name.view_name;
Answer: D) DROP INDEX database_name.view_name;
Explanation:
The syntax of DROP VIEW statement is:
DROP INDEX database_name.view_name;
95. What is the syntax of DROP TRIGGER statement?
- DROP TRIGGER database_name.trigger_name;
- DROP TRIGGER trigger_name;
- DROP TRIGGER database_name;
- DROP INDEX database_name.trigger_name;
Answer: D) DROP INDEX database_name.trigger_name;
Explanation:
The syntax of DROP TRIGGER statement is:
DROP INDEX database_name.trigger_name;
96. What is/are the syntax of SQLite EXPLAIN statement?
- EXPLAIN INSERT statement…;
- EXPLAIN QUERY PLAN SELECT statement…;
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The syntax of SQLite EXPLAIN statement are –
- EXPLAIN INSERT statement…;
- EXPLAIN QUERY PLAN SELECT statement…;
97. What is the syntax of SQLite PRAGMA statement?
- PRAGMA pragma_name;
- CREATE PRAGMA pragma_name;
- INSERT PRAGMA pragma_name;
- UPDATE PRAGMA pragma_name;
Answer: A) PRAGMA pragma_name;
Explanation:
The syntax of SQLite PRAGMA statement is “PRAGMA pragma_name;”
98. What is the syntax of SQLite RELEASVE SAVEPOINT statement?
- RELEASE SAVEPOINT savepoint_name;
- RELEASE savepoint_name;
- RELEASE name;
- RELEASE SAVEPOINT name;
Answer: B) RELEASE savepoint_name;
Explanation:
The syntax of SQLite RELEASE SAVEPOINT statement is:
RELEASE savepoint_name;
99. What is/are the syntax of REINDEX statement?
- REINDEX collation_name;
- REINDEX database_name.index_name;
- REINDEX database_name.table_name;
- All of the above
Answer: D) All of the above
Explanation:
The syntax of REINDEX statement are –
- REINDEX collation_name;
- REINDEX database_name.index_name;
- REINDEX database_name.table_name;
100. What is/are the syntax of ROLLBACK statement?
- ROLLBACK;
- ROLLBACK TO SAVEPOINT savepoint_name;
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The syntax of ROLLBACK statements are –
- ROLLBACK;
- ROLLBACK TO SAVEPOINT savepoint_name;
101. What is the syntax of SQLite SAVEPOINT statement?
- SAVEPOINT savepoint_name;
- SAVEPOINT name;
- SAVEPOINT;
- None of the above
Answer: A) SAVEPOINT savepoint_name;
Explanation:
The syntax of SQLite SAVEPOINT statement is:
SAVEPOINT savepoint_name;
102. Any object’s ____ can be specified using SQLite data types.
- Type
- Data type
- Datasets
- Data variables
Answer: B) Data type
Explanation:
Any object’s data type can be specified using SQLite data types.
103. Data types for ____ are defined in SQLite.
- Columns
- Variables
- Expressions
- All of the above
Answer: D) All of the above
Explanation:
Data types for columns, variables, and expressions are defined in SQLite.
104. Datatypes in SQLite are associated with ____ themselves rather than their containers.
- Values
- Arrays
- Stacks
- Pointers
Answer: A) Values
Explanation:
Datatypes in SQLite are associated with values themselves rather than their containers.
105. What does the NULL storage class do?
- In this case, it specifies a not null value
- In this case, it specifies a current value
- In this case, it specifies a null value
- In this case, it specifies a real value
Answer: C) In this case, it specifies a null value
Explanation:
The NULL storage class specifies a current value.
106. Depending on the magnitude of the value, the value is stored as a signed integer in _, 4, 6, or 8 bytes in INTEGER storage class.
- 1
- 2
- 3
- All of the above
Answer: D) All of the above
Explanation:
Depending on the magnitude of the value, the value is stored as a signed integer in 1, 2, 3, 4, 6, or 8 bytes in INTEGER storage class.
107. As an IEEE floating point number, REAL specifies the value as a ____.
- Real value
- Real point value
- Floating value
- Floating point value
Answer: D) Floating point value
Explanation:
As an IEEE floating point number, REAL specifies the value as a floating-point value.
108. If text is specified, the value will be a ____, encoded using the database encoding (utf-8, utf-16be, utf-16le).
- Number
- Text
- Text string
- None of the above
Answer: C) Text string
Explanation:
If text is specified, the value will be a text string, encoded using the database encoding (utf-8, utf-16be, utf-16le).
109. Values with the BLOB type are ___ of data that are stored in their original format.
- Blogs
- Blobs
- Binary
- Boolean
Answer: B) Blobs
Explanation:
Values with the BLOB type are blobs of data that are stored in their original format.
110. There is no limit to what data types a column can store, but its ____ determines how it is stored.
- Storage
- Memory
- Pages
- Affinity
Answer: D) Affinity
Explanation:
There is no limit to what data types a column can store, but its affinity determines how it is stored.
111. ____ storage class(es) is/are all stored in the TEXT column.
- NULL
- TEXT
- BLOB
- All of the above
Answer: D) All of the above
Explanation:
NULL, TEXT, and BLOB storage classes are all stored in the TEXT column.
112. Each of the ____ storage classes may be used in the NUMERIC column.
- Two
- Three
- Four
- Five
Answer: D) Five
Explanation:
Each of the five storage classes may be used in the NUMERIC column.
113. With an exception in a cast expression, INTEGER behaves like a column with ____ affinity.
- Variable affinity
- Text affinity
- Numeric affinity
- Null affinity
Answer: C) Numeric affinity
Explanation:
With an exception in a cast expression, INTEGER behaves like a column with numeric affinity.
114. Integer values are converted into _____ by REAL, just like a column with numeric affinity.
- Point values
- Floating values
- Floating point values
- None of the above
Answer: C) Floating point values
Explanation:
Integer values are converted into floating point values by REAL, just like a column with numeric affinity.
115. Columns with affinity NONE maintain ____ between storage classes and don’t persuade data between them.
- Preference
- No preference
- Partial preference
- Average preference
Answer: B) No preference
Explanation:
Columns with affinity NONE maintain no preference between storage classes and don’t persuade data between them.
116. Which of the following is/are the data type(s) for the INTEGER affinity?
- INT
- INTEGER
- BIGINT
- All of the above
Answer: D) All of the above
Explanation:
The following are the data types for the INTEGER affinity –
- INT
- INTEGER
- BIGINT
117. Which of the following is NOT the data type for the INTEGER affinity?
- TINYINT
- SMALLINT
- NUMERIC
- MEDIUMINT
Answer: C) NUMERIC
Explanation:
NUMERIC is NOT the data type for the INTEGER affinity.
118. Which of the following is/are the data type(s) for the TEXT affinity?
- CHARACTER()
- VARCHAR()
- NCHAR()
- All of the above
Answer: D) All of the above
Explanation:
The following are the data types for the TEXT affinity –
- CHARACTER()
- VARCHAR()
- NCHAR()
119. Which of the following is the data type for the NONE affinity?
- BLOB datatype specified
- BLOB no datatype specified
- CLOB datatype specified
- CLOB no datatype specified
Answer: B) BLOB no datatype specified
Explanation:
BLOB no datatype specified is the data type for the NONE affinity.
120. Which of the following is/are the data type(s) for the REAL affinity?
- NUMERIC
- DATETIME
- FLOAT
- All of the above
Answer: C) FLOAT
Explanation:
FLOAT is the data type for the REAL affinity.
121. Which of the following is NOT the data type for REAL affinity?
- REAL
- DOUBLE
- DOUBLE PRECISION
- INTEGER
Answer: D) INTEGER
Explanation:
INTEGER is NOT the data type for REAL affinity.
122. Which of the following is/are the data type(s) for NUMERIC affinity?
- NUMERIC
- DECIMAL(,)
- DATETIME
- All of the above
Answer: D) All of the above
Explanation:
The following are the data types for NUMERIC affinity –
- NUMERIC
- DECIMAL(,)
- DATETIME
123. There is no separate class for storing ____ in SQLite.
- Dates
- Times
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
There is no separate class for storing dates and times in SQLite.
124. ____ values can be used to store date and time values.
- TEXT
- REAL
- INTEGER
- All of the above
Answer: D) All of the above
Explanation:
TEXT, REAL, or INTEGER values can be used to store date and time values.
125. A Boolean value is stored as an ____ 0 (false) or 1 (true).
- Real
- Integer
- Text
- Float
Answer: B) Integer
Explanation:
A Boolean value is stored as an integer 0 (false) or 1 (true).
126. Whenever we use the WHERE clause in SQLite to perform arithmetic or comparison operations, SQLite operators are reserved ____.
- Words
- Characters
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
Whenever we use the WHERE clause in SQLite to perform arithmetic or comparison operations, SQLite operators are reserved words or characters.
127. An SQLite statement may contain operators to specify conditions or as a _____ for multiple conditions.
- Command
- Control
- Conjuction
- Cartesian
Answer: C) Conjuction
Explanation:
An SQLite statement may contain operators to specify conditions or as a conjunction for multiple conditions.
128. How many types of operators are there in SQLite?
- 2
- 3
- 4
- 5
Answer: C) 4
Explanation:
There are 4 types of operators in SQLite.
129. Which of the following is/are the type(s) of operator in SQLite?
- Arithmetic
- Comparison
- Logical
- All of the above
Answer: D) All of the above
Explanation:
The following are the types of operators in SQLite –
- Arithmetic
- Comparison
- Logical
130. Which of the following is an SQLite Arithmetic Operator?
- *
- /
- %
- All of the above
Answer: D) All of the above
Explanation:
*, /, % are all the SQLite Arithmetic Operators.
131. Which of the following is/are a/the SQLite Comparison Operator(s)?
- ==
- =
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The operators ==, = both are the SQLite Comparison Operators.
132. Which of the following is not the SQLite Comparison Operator?
- >
- <
- –
- <=
Answer: C) –
Explanation:
‘-‘ is not the SQLite Comparison operator.
133. What is TRUE about !< operator in SQLite?
- In this case, the condition becomes true if the value of left operand is lesser than that of right operand
- In this case, the condition becomes true if the value of left operand is higher than that of right operand
- In this case, the condition becomes true if the value of right operand is higher than that of right operand
- None of the above
Answer: B) In this case, the condition becomes true if the value of left operand is higher than that of right operand
Explanation:
In !< operator case, the condition becomes true if the value of left operand is higher than that of right operand.
134. Which of the following is/are the SQLite Logical Operator(s)?
- AND
- IN
- ||
- All of the above
Answer: D) All of the above
Explanation:
The following are the SQLite Logical Operators –
- AND
- IN
- ||
135. By using wildcard operators, the ____ operator compares a value to similar values.
- LIKE
- GLOB
- glob
- Both A and B
Answer: D) Both A and B
Explanation:
By using wildcard operators, the LIKE and GLOB operator compares a value to similar values.
136. Adding two strings and making a new one is done with the ____ operator.
- |
- ||
- |||
- !!
Answer: B) ||
Explanation:
Adding two strings and making a new one is done with the || operator.
137. Using SQLite Bitwise operators, you can perform operations ____ on bits.
- Bit by Bit
- Byte by Byte
- MB by MB
- KB by KB
Answer: A) Bit by Bit
Explanation:
Using SQLite Bitwise operators, you can perform operations bit by bit on bits.
138. Which of the following is/are an/the SQLite Bitwise Operator(s)?
- ~
- < <
- > >
- All of the above
Answer: D) All of the above
Explanation:
The following are the SQLite Bitwise Operators –
- ~
- < <
- > >
139. Bits are flipped in Binary Ones Complement Operators (~), which are ___ operators.
- Unary
- Binary
- Ternary
- None
Answer: A) Unary
Explanation:
Bits are flipped in Binary Ones Complement Operators (~), which are unary operators.
140. An operation that shifts the left operand value left by the right operand’s number of bits is known as the ____ (<<).
- Binary Left Shift Operator
- Binary Left Operator
- Binary Shift Operator
- Binary Right Shift Operator
Answer: A) Binary Left Shift Operator
Explanation:
An operation that shifts the left operand value left by the right operand’s number of bits is known as the Binary Left Shift Operator.
141. ____ can be combined into SQLite Expressions.
- Values
- Operates
- SQL Functions
- All of the above
Answer: D) All of the above
Explanation:
Values, operators, and SQL functions can be combined into SQLite Expressions.
142. An SQLite expression uses ____ statements and is written in the query language.
- CREATE
- SELECT
- INSERT
- ALTER
Answer: B) SELECT
Explanation:
An SQLite expression uses SELECT statements and is written in the query language.
143. How many types of SQLite expressions are there?
- 1
- 2
- 3
- 4
Answer: C) 3
Explanation:
There are 3 types of SQLite expressions.
144. Which of the following is/are the type(s) of SQLite expression?
- Boolean
- Numeric
- Date
- All of the above
Answer: D) All of the above
Explanation:
The following are the types of SQLite expressions –
- Boolean
- Numeric
- Date
145. The data is fetched using SQLite Boolean expressions based on matching ____ value.
- Single
- Double
- Triple
- Multiple
Answer: A) Single
Explanation:
The data is fetched using SQLite Boolean expressions based on matching a single value.
146. ____ operations are performed in queries using SQLite Numeric expressions.
- Algebraic
- Mathematical
- Robotics
- Textual
Answer: B) Mathematical
Explanation:
Mathematical operations are performed in queries using SQLite Numeric expressions.
147. There are several built-in functions in numerical expressions, such as ____.
- avg()
- sum()
- count()
- All of the above
Answer: D) All of the above
Explanation:
There are several built-in functions in numerical expressions, such as avg(), sum(), count(), etc.
148. ____ include avg(), sum(), count(), etc.
- Data calculation functions
- Aggregate calculation functions
- Aggregate data calculation functions
- None of the above
Answer: C) Aggregate data calculation functions
Explanation:
Aggregate data calculation functions include avg(), sum(), count(), etc.
149. The current system ____ is/are retrieved using SQLite Date expressions.
- Date
- Time
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The current system date and time are retrieved using SQLite Date expressions.
150. What is the syntax of SQLite Date Expressions?
- SELECT TIMESTAMP;
- SELECT CURRENT;
- SELECT DATETIME;
- SELECT CURRENT_TIMESTAMP;
Answer: D) SELECT CURRENT_TIMESTAMP;
Explanation:
The syntax of SQLite Date Expressions is: