Sqlite - Syntax: Case Sensitivity
Sqlite - Syntax: Case Sensitivity
Sqlite - Syntax: Case Sensitivity
SQLITE - SYNTAX
https://www.tutorialspoint.com/sqlite/sqlite_syntax.htm Copyright © tutorialspoint.com
Advertisements
SQLite is followed by unique set of rules and guidelines called Syntax. This chapter lists all the basic SQLite
Syntax.
Case Sensitivity
Important point to be noted is that SQLite is case insensitive, but there are some commands, which are case
sensitive like GLOB and glob have different meaning in SQLite statements.
Comments
SQLite comments are extra notes, which you can add in your SQLite code to increase its readability and they can
appear anywhere; whitespace can occur, including inside expressions and in the middle of other SQL statements
but they cannot be nested.
SQL comments begin with two consecutive "-" characters AS C I I 0x2d and extend up to and including the next
newline character AS C I I 0x0a or until the end of input, whichever comes first.
You can also use C-style comments, which begin with "/*" and extend up to and including the next "*/" character
pair or until the end of input, whichever comes first. C-style comments can span multiple lines.
SQLite Statements
All the SQLite statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE, ALTER,
DROP, etc., and all the statements end with a semicolon ;.
ANALYZE;
or
ANALYZE database_name;
or
ANALYZE database_name.table_name;
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 1/6
10/3/2018 SQLite Syntax
BEGIN;
or
BEGIN EXCLUSIVE TRANSACTION;
COMMIT;
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 2/6
10/3/2018 SQLite Syntax
COMMIT;
SELECT COUNT(column_name)
FROM table_name
WHERE CONDITION;
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 3/6
10/3/2018 SQLite Syntax
SELECT SUM(column_name)
FROM table_name
WHERE CONDITION
GROUP BY column_name;
SELECT SUM(column_name)
FROM table_name
WHERE CONDITION
GROUP BY column_name
HAVING (arithematic function condition);
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 4/6
10/3/2018 SQLite Syntax
SQLite IN Clause
PRAGMA pragma_name;
For example:
PRAGMA page_size;
PRAGMA cache_size = 1024;
PRAGMA table_info(table_name);
RELEASE savepoint_name;
REINDEX collation_name;
REINDEX database_name.index_name;
REINDEX database_name.table_name;
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 5/6
10/3/2018 SQLite Syntax
ROLLBACK;
or
ROLLBACK TO SAVEPOINT savepoint_name;
SAVEPOINT savepoint_name;
UPDATE table_name
SET column1 = value1, column2 = value2....columnN=valueN
[ WHERE CONDITION ];
VACUUM;
https://www.tutorialspoint.com/cgi-bin/printpage.cgi 6/6