Student Information System
Simple ATM System
SQL SUM() Function
The SUM function is an aggregate function use to calculate the total amount of a column. SUM function can be use only in numeric column.
Syntax
Shopping Cart Application
SQL NOW() Function
The NOW() function is an aggregate function used to return the date and time along with other column.
The NOW() function returns the result as dd/mm/yyyy HH:MM:SS AM/PM depending on your regional settings.
SQL NOW() Syntax
SQL LEN() Function
The LEN function is useful to count the number of characters in a column you specified as the parameter. LEN is short for length. The LEN function returns the number of characters including spaces or any character within that column.
You can use SQL Alias to name the result of the LEN function.
SQL LEN() Syntax
SQL FORMAT Function
The FORMAT() function is normally applied on formatting column with Date value like YYYY, MM, and DD.
SQL FORMAT() Syntax
SQL UNIQUE Contraints
The UNIQUE Contraints identifies a record in a database table uniquely. Unlike PRIMARY KEY contraints, you can have many UNIQUE contraint in a table.
UNIQUE Contraints Syntax - MySQL
SQL Union Operator
The UNION Operator is used to combine the result set of two or more SELECT Statement. This operator is useful if you have two table that share the same column name and data type and you want to combine it in a single Query.
Take note that both table must have the same column name and data type.