Author: admin
-
GLOB Clause
SQLite GLOB operator is used to match only text values against a pattern using wildcards. If the search expression can be matched to the pattern expression, the GLOB operator will return true, which is 1. Unlike LIKE operator, GLOB is case sensitive and it follows syntax of UNIX for specifying THE following wildcards. The asterisk sign (*)…
-
LIKE Clause
SQLite LIKE operator is used to match text values against a pattern using wildcards. If the search expression can be matched to the pattern expression, the LIKE operator will return true, which is 1. There are two wildcards used in conjunction with the LIKE operator − The percent sign represents zero, one, or multiple numbers or characters.…
-
DELETE Query
SQLite DELETE Query is used to delete the existing records from a table. You can use WHERE clause with DELETE query to delete the selected rows, otherwise all the records would be deleted. Syntax Following is the basic syntax of DELETE query with WHERE clause.DELETE FROM table_name WHERE [condition]; You can combine N number of conditions using AND or…
-
UPDATE Query
SQLite UPDATE Query is used to modify the existing records in a table. You can use WHERE clause with UPDATE query to update selected rows, otherwise all the rows would be updated. Syntax Following is the basic syntax of UPDATE query with WHERE clause. You can combine N number of conditions using AND or OR operators. Example Consider COMPANY…
-
AND & OR Operators
SQLite AND & OR operators are used to compile multiple conditions to narrow down the selected data in an SQLite statement. These two operators are called conjunctive operators. These operators provide a means to make multiple comparisons with different operators in the same SQLite statement. The AND Operator The AND operator allows the existence of multiple conditions in a SQLite statement’s WHERE…
-
WHERE Clause
SQLite WHERE clause is used to specify a condition while fetching the data from one table or multiple tables. If the given condition is satisfied, means true, then it returns the specific value from the table. You will have to use WHERE clause to filter the records and fetching only necessary records. The WHERE clause not only…
-
Operators
What is an Operator in SQLite? An operator is a reserved word or a character used primarily in an SQLite statement’s WHERE clause to perform operation(s), such as comparisons and arithmetic operations. Operators are used to specify conditions in an SQLite statement and to serve as conjunctions for multiple conditions in a statement. SQLite Arithmetic…
-
CREATE Table
SQLite CREATE TABLE statement is used to create a new table in any of the given database. Creating a basic table involves naming the table and defining its columns and each column’s data type. Syntax Following is the basic syntax of CREATE TABLE statement.CREATE TABLE database_name.table_name( column1 datatype PRIMARY KEY(one or more columns), column2 datatype, column3 datatype,…
-
DETACH Database
SQLite DETACH DATABASE statement is used to detach and dissociate a named database from a database connection which was previously attached using ATTACH statement. If the same database file has been attached with multiple aliases, then DETACH command will disconnect only the given name and rest of the attachment will still continue. You cannot detach the main or temp databases. If…
-
ATTACH Database
Consider a case when you have multiple databases available and you want to use any one of them at a time. SQLite ATTACH DATABASE statement is used to select a particular database, and after this command, all SQLite statements will be executed under the attached database. Syntax Following is the basic syntax of SQLite ATTACH DATABASE statement.…