SQLite Triggers are database objects that are automatically executed when certain events occur. Triggers can be used to enforce complex business rules, perform data validation, or perform other actions SQLite cannot do directly. Triggers are written in SQL, and can be attached to tables or views. When an event that the trigger is programmed to…(Continue Reading)
Author: sqlitetutor_obng7r
SQLite TOTAL
The SQLite TOTAL function calculates and returns the sum of all values in a set, ignoring null values. The SQLite TOTAL function is identical to the SUM function, both are aggregate functions and both return the sum of all values in a set of values. The only difference is when there are no values in…(Continue Reading)
SQLite SUM
The SQLite SUM function calculates and returns the sum of all values in a set, ignoring null values. Syntax Here is the syntax of SQLite SUM function: SELECT SUM(column_name) FROM table_name; Example Table of books ID NAME PRICE 1 SQLite 10 2 SQL 20 3 PL/SQL 30 4 PHP NULL 5 Python 20 6 HTML…(Continue Reading)
SQLite MIN
The SQLite MIN function calculates and returns the minimum value of all values in a set. Syntax Here is the syntax of SQLite MIN function: SELECT MIN(column_name) FROM table_name; The type of column_name must be NUMERIC or INTEGER. Example Table of books ID NAME PRICE 1 SQLite 10 2 SQL 20 3 PL/SQL 30 4…(Continue Reading)
SQLite MAX
The SQLite MAX function calculates and returns the maximum value of all values in a set. Syntax Here is the syntax of SQLite MAX function: SELECT MAX(column_name) FROM table_name; The type of column_name must be NUMERIC or INTEGER. Example Table of books ID NAME PRICE 1 SQLite 10 2 SQL 20 3 PL/SQL 30 4…(Continue Reading)
SQLite COUNT
The SQLite COUNT function calculates and returns the number of values in a set. Also SQLite COUNT function can count the number of rows with non-null values. Syntax Here is the syntax of SQLite COUNT function: SELECT COUNT(*) FROM table_name; Syntax of SQLite COUNT function with non-null values: SELECT COUNT(column_name) FROM table_name; Example Table of…(Continue Reading)