SQL Function

SQL Having

Author: Webetutorial, Posted On: ago

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()

Author: Webetutorial, Posted On: ago

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()

Author: Webetutorial, Posted On: ago

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()

Author: Webetutorial, Posted On: ago

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 Len()

Author: Webetutorial, Posted On: ago

The LEN() returns the length of the value in a text field. SQL LEN() Syntax:- SELECT LEN(column_name) FROM table_name; SQL LEN() Example:- The subsequent SQL selects the “VisitorName” and the length of the values in Read more…

SQL Function

SQL Round()

Author: Webetutorial, Posted On: ago

The ROUND() is used to round a numeric to the number of decimals specified. SQL ROUND() Syntax:- SELECT ROUND(column_name,decimals) FROM table_name; SQL ROUND() Example:- The subsequent SQL selects the name and rounds the price of Read more…

SQL Function

SQL Now()

Author: Webetutorial, Posted On: ago

The NOW() returns the current system date and time. SQL NOW() Syntax:- SELECT NOW() FROM table_name; SQL NOW() Example:- The subsequent SQL selects the name and age for today from the “Visitors” table:- SELECT Name, Read more…

SQL Function

SQL Format()

Author: Webetutorial, Posted On: ago

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

Author: Webetutorial, Posted On: ago

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…