SQL Function

SQL Having

The HAVING was added to SQL because the WHERE keyword cannot be used with aggregate functions. Syntax:- SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP BY column_name HAVING aggregate_function(column_name) operator value; Example:- Now Read more…

SQL Function

SQL Ucase()

The UCASE() converts the value of a field to uppercase. Syntax:- SELECT UCASE(column_name) FROM table_name; Example:- The subsequent SQL selects the “VisitorName” and “City” columns from the “Visitors” table, and converts the “VisitorName” column to Read more…

SQL Function

SQL Lcase()

The LCASE() converts the value of a field to lowercase. Syntax:- SELECT LCASE(column_name) FROM table_name; Example:- The subsequent SQL selects the “VisitorName” and “City” columns from the “Visitors” table, and converts the “VisitorName” column to Read more…

SQL Function

SQL Mid()

The MID() is used to extract characters from a text field. Syntax:- SELECT MID(column_name,start,length) AS some_name FROM table_name; Example:- The subsequent SQL selects the first three characters from the “City” column from the “Visitors” table:- Read more…

SQL Function

SQL Format()

The FORMAT() function is used to design how a field is to be displayed. SQL FORMAT() Syntax:- SELECT FORMAT(column_name,format) FROM table_name; SQL FORMAT() Example:- SELECT Name, age, FORMAT(Now(),’YYYY-MM-DD’) AS Date FROM Visitors;

SQL

SQL Alter Table

The SQL ALTER TABLE is used to add, delete or modify columns in an existing table. SQL Alter Table:- ALTER TABLE table_name ADD column_name datatype Drop Column:- ALTER TABLE table_name DROP COLUMN column_name; Add Unique Read more…