INSERT statement allows you to insert one or more rows to the table. In MySQL, the INSERT statement form is listed as follows: INSERT INTO Syntax INSERT INTO table_name VALUES (value1, value2, [...]
UPDATE statement is used to update existing data in database tables. It can be used to change values of single row, group of rows or even all rows in a table. In MySQL, the SQL UPDATE statement [...]
Delete Rows in a table The DELETE statement is used to delete rows in a table. SQL DELETE Syntax DELETE FROM table_name [WHERE condition] [ORDER BY column_name] [LIMIT row_count] The WHERE clause [...]
SELECT Statement In order to retrieve data from MySQL database server you use SQL SELECT statement. Here is the most typical form of it. SELECT column_name1,column_name2… FROM tables [WHERE [...]
BETWEEN…AND allows you to retrieve values within a specific range. The usage of BETWEEN is as follows: SELECT column_list FROM table_name WHERE column_1 BETWEEN lower_range AND upper_range [...]
LIKE operator allows you to perform pattern matching in your column in a database table. LIKE is often used with SELECT statement in WHERE clause. MySQL provides you two wildcard characters for [...]
UNION is used to combine the result from multiple SELECT statements into a single result set. The column names from the first SELECT statement are used as the column names for the results [...]
MySQL Joins SQL joins are used to query data from two or more tables, based on a relationship between certain columns in these tables. The JOIN keyword is used to query data from two or more [...]
A subquery is a SELECT statement within another statement. Here is an example of a subquery: SELECT * FROM t1 WHERE column1 = (SELECT column1 FROM t2); The main advantages of subqueries are: They [...]