Category: My SQL
-
MySQL FUNCTIONS and OPERATORS
FUNCTIONS and OPERATORS In the following section, we have given a list of FUNCTIONS and OPERATORS in MySQL as anyone can view the FUNCTIONS at a glance and jump immediately to his/her requirement. MySQL Function & Operators Description Introduction of MySQL functions and operators Types of MySQL functions and operators. MySQL Comparison Functions and Operators…
-
MySQL aggregate functions and grouping
aggregate functions MySQL aggregate functions retrieve a single value after performing a calculation on a set of values. In general, aggregate functions ignore null values. Often, aggregate functions are accompanied by the GROUP BY clause of the SELECT statement. List of MySQL aggregate functions and a hint of what they do AVG() MySQL AVG() retrieves…
-
MySQL UNION
UNION In MySQL, the UNION operator is used to combine the result from multiple SELECT statements into a single result set. The default characteristic of UNION is, to remove the duplicate rows from the result. The DISTINCT keyword which is optional does not make any effect, because, by default, it specifies duplicate-row removal. But if…
-
MySQL SELECT statement
SELECT statement MySQL SELECT statement is used to retrieve rows from one or more tables. The statement can also include UNION statements and subqueries. Syntax:SELECT [ALL | DISTINCT | DISTINCTROW ] [HIGH_PRIORITY] [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT] [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] select_expr [, select_expr …] [FROM table_references [WHERE where_condition] [GROUP BY {col_name | expr | position} [ASC…
-
MySQL DELETE statement
DELETE statement DELETE statement is used to remove rows from a table. Version: MySQL 5.6 Single-table syntax:DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM table_name [PARTITION (partition_name,…)] [WHERE where_condition] [ORDER BY …] [LIMIT row_count] Explanation: Multiple-table syntax :DELETE [LOW_PRIORITY] [QUICK] [IGNORE] tbl_name[.*] [, tbl_name[.*]] … FROM table_references [WHERE where_condition] Or :DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name[.*] [, tbl_name[.*]] ……
-
MySQL UPDATE Statement
UPDATE Table The MySQL UPDATE statement is used to update columns of existing rows in a table with new values. Version: 5.6 Syntax : Single table:UPDATE [LOW_PRIORITY] [IGNORE] table_reference SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] … [WHERE where_condition] [ORDER BY …] [LIMIT row_count] Multiple tables:UPDATE [LOW_PRIORITY] [IGNORE] table_references SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] … [WHERE where_condition] Arguments Name…
-
MySQL INSERT statement
INSERT statement MySQL INSERT statement is used to insert record(s) or row(s) into a table. The insertion of records or rows in the table can be done in two ways, insert a single row at a time, and insert multiple rows at a time. Version: MySQL 5.6 Syntax:INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name…
-
MySQL Partitioning
What is Partitioning? Partitioning (a database design technique) improves performance, manageability, simplifies maintenance and reduce the cost of storing large amounts of data. Partitioning can be achieved without splitting tables by physically putting tables on individual disk drives. Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, therefore queries that access…
-
MySQL INSERT statement
INSERT statement MySQL INSERT statement is used to insert record(s) or row(s) into a table. The insertion of records or rows in the table can be done in two ways, insert a single row at a time, and insert multiple rows at a time. Version: MySQL 5.6 Syntax:INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name…
-
MySQL Partitioning
What is Partitioning? Partitioning (a database design technique) improves performance, manageability, simplifies maintenance and reduce the cost of storing large amounts of data. Partitioning can be achieved without splitting tables by physically putting tables on individual disk drives. Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, therefore queries that access…