![]() ![]() It does not support GRANT and REVOKE commands as SQLite reads and writes to the disk files. SQLite only allows normal file access permissions.It neither supports RIGHT nor FULL OUTER JOIN. For the students whose age is greater than 20, you must assign a value “not teenagers.” In the example above, you return the value “teenagers” for students whose age is less than 20. The CASE statement is similar to the IF-THEN-ELSE statement. ![]() If no conditions are true, it will return the value in the ELSE clause. As it fulfills the first condition, it will stop reading the condition and return the result. The SQLite CASE expression evaluates through conditions and fetches a value when it fulfills the first condition. The above query returns the students whose age is between 20 years and 30 years. WHERE column_name BETWEEN value1 AND value2 It has both the starting and the ending values included. The BETWEEN operator selects values within a given range. The above query returns unique address values from the table. It is used when you have many duplicate values in the table. The DISTINCT clause with the SELECT statement is used to return only distinct records. The underscore sign (_) represents one, a single character.The percent sign (%) represents zero, one, or multiple characters.There are two wildcards used with LIKE Operator: The SQLite LIKE operator is used to search for a specified pattern using wildcards. The COUNT function is used to fetch the number of rows that fulfill a specified expression. The SUM function is used to yield the total sum of a numeric column. The AVG function yields the average value of a numeric column. The MAX function is used to fetch the largest value of an expression. The MIN function is used to fetch the smallest value of an expression. ![]() The ORDER BY clause sorts the result in ascending or descending order based on one or more columns. The having clause is mostly used with aggregated functions and it is also used to specify conditions for a particular output. The GROUP BY statement groups rows that have the same values into summary rows. It is a conjunctive operator which makes multiple comparisons with different operators in the same SQLite statement. The where clause extracts only those records that fulfill a stated condition. The delete command is used to delete specific records (selected rows) from the table. SET column1 = value1, column2 = value2., columnN = valueN It is used with the WHERE clause to select specific rows. In SQLite, the UPDATE query is used to modify the existing records in a table. You can view the output by using the SELECT statement.Ī SELECT statement is used to fetch data from a given table. VALUES (value1, value2, value3.,values n) INSERT INTO Table_name (col1, col2.,col n) After you create the table, this command is used to insert records into the table. In SQLite, the INSERT INTO statement is used to add new rows of data into a table. You will understand this command better with the help of an example. While creating the table, you name that table and define its column and data types of each column.Ĭol datatype PRIMARY KEY(one or more columns), In SQLite, the CREATE TABLE statement is used to create a new table. Now, you will look at some basic commands in this SQLite tutorial. Now, you can write various SQLite commands in the Command Prompt. Step4: Now, open the Command Prompt and navigate to the C:\sqlite folder. Step3: Create a folder named sqlite in the C directory and copy the sqlite3.exe file in the sqlite folder. Step2: Download the file (sqlite-tools-win3200.zip) as shown in the figure below and extract these files in a folder of your choice. Step1: Go to the official SQLite website and download precompiled binaries from the Windows section. Now, you will see how to download and install SQLite on Windows in this SQLite tutorial.
0 Comments
Leave a Reply. |