Free · 64 Topics · No Signup
MySQL Notes
Relational SQL — queries, joins, constraints, views and prepared statements — written by CodingNow 2.0's mentors. Free to read, structured to actually help you learn.
MySQL notes by CodingNow 2.0 cover 64 topics — from mysql home to mysql prepared statements — each explained with short definitions, syntax and runnable code examples. They are 100% free, need no signup, and work as quick revision for college exams, MySQL interviews and CodingNow 2.0's mentor-led MySQL course in Pitampura, Delhi.
No notes found. Try a different search term, or browse all MySQL notes.
MySQL Tutorial
3 of 3 topics publishedMySQL SQL
43 of 43 topics publishedMySQL SQL
SQL is the standard language for dealing with Relational Databases.
MySQL SELECT
The SELECT statement is used to select data from a database.
MySQL SELECT DISTINCT
The SELECT DISTINCT statement is used to return only distinct (unique) values.
MySQL WHERE
The WHERE clause is used to filter records.
MySQL ORDER BY
The ORDER BY keyword is used to sort the result-set in ascending or descending order.
MySQL AND
The WHERE clause can contain one or many AND operators.
MySQL OR
The WHERE clause can contain one or more OR operators.
MySQL NOT
The NOT operator is used in the WHERE clause to return all records that DO NOT match the specified criteria. It reverses the result of a condition from true
MySQL INSERT INTO
The INSERT INTO statement is used to insert new records in a table.
MySQL NULL Values
If a field in a table is optional, it is possible to insert or update a record without adding any value to this field. This way, the field will be saved with a
MySQL UPDATE
The UPDATE statement is used to update or modify one or more records in a table.
MySQL DELETE
The DELETE statement is used to delete existing records in a table.
MySQL LIMIT
The LIMIT clause is used to limit the number of records to return.
MySQL Aggregate Functions
An aggregate function is a function that performs a calculation on a set of values, and returns a single value.
MySQL MIN()
The MIN() function returns the smallest value of the selected column.
MySQL MAX()
The MAX() function returns the largest value of the selected column.
MySQL COUNT()
The COUNT() function returns the number of rows that matches a specified criterion.
MySQL SUM()
The SUM() function is used to calculate the total sum of values within a numeric column.
MySQL AVG()
The AVG() function returns the average value of a numeric column.
MySQL LIKE
The LIKE operator is used in a WHERE clause to search for a specified pattern within a column's text data.
MySQL Wildcards
A wildcard character is used to substitute one or more characters in a string.
MySQL IN
The IN operator is used in the WHERE clause to check if a specified column's value matches any value within a provided list.
MySQL BETWEEN
The BETWEEN operator is used in the WHERE clause to select values within a specified range.
MySQL Aliases
An alias is created with the AS keyword, and is often used to make a column name more readable.
MySQL Joins
The JOIN clause is used to combine rows from two or more tables, based on a related column between them.
MySQL INNER JOIN
The INNER JOIN clause returns only rows that have matching values in both tables.
MySQL LEFT JOIN
The LEFT JOIN clause returns all rows from the left table (table1), and only the matched rows from the right table (table2).
MySQL RIGHT JOIN
The RIGHT JOIN clause returns all rows from the right table (table2), and only the matched rows from the left table (table1).
MySQL CROSS JOIN
The CROSS JOIN clause returns the Cartesian product of two or more tables (combines every row from the first table with every row from the second table).
MySQL Self Join
A self join is a regular join, but the table is joined with itself.
MySQL UNION
The UNION operator is used to combine the result-set of two or more SELECT statements.
MySQL UNION ALL
The UNION ALL operator is used to combine the result-set of two or more SELECT statements.
MySQL GROUP BY
The GROUP BY statement is used to group rows that have the same values into summary rows, like "Find the number of customers in each country".
MySQL HAVING
The HAVING clause is used to filter the results of a GROUP BY query based on aggregate functions.
MySQL EXISTS
The EXISTS operator is used in a WHERE clause to check whether a subquery returns any rows.
MySQL ANY
The ANY operator is used to compare a value to every value returned by a subquery.
MySQL ALL
The ALL operator is used to compare a value to every value returned by a subquery.
MySQL INSERT SELECT
The INSERT INTO SELECT statement is used to copy data from an existing table and insert it into another existing table.
MySQL CASE
The CASE statement is used to define different results based on specified conditions in an SQL statement.
MySQL Null Functions
Operations involving NULL values can sometimes lead to unexpected results.
MySQL Stored Procedures
A stored procedure is a precompiled SQL code that can be saved and reused.
MySQL Comments
Comments are used to explain SQL code, or to temporarily prevent execution of SQL code (for debugging).
MySQL Operators
MySQL operators are keywords and symbols used to perform operations with data values.
MySQL Database
18 of 18 topics publishedMySQL Create DB
The CREATE DATABASE statement is used to create a new SQL database.
MySQL Drop DB
The DROP DATABASE statement is used to permanently delete an existing SQL database.
MySQL Create Table
The CREATE TABLE statement is used to create a new table in a database.
MySQL Drop Table
The DROP TABLE statement is used to permanently delete an existing table in a database.
MySQL Alter Table
The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
MySQL Constraints
Constraints are rules for data in a table.
MySQL Not Null
The NOT NULL constraint enforces a column to NOT accept NULL values. This enforces a field to always contain a value, which means that you cannot insert a new
MySQL Unique
The UNIQUE constraint ensures that all values in a column are unique.
MySQL Primary Key
The PRIMARY KEY constraint uniquely identifies each record in a database table.
MySQL Foreign Key
The FOREIGN KEY constraint establishes a link between two tables, and prevents action that will destroy the link between them.
MySQL Check
The CHECK constraint is used to ensure that the values in a column satisfies a specific condition.
MySQL Default
The DEFAULT constraint is used to automatically insert a default value for a column, if no value is specified.
MySQL Create Index
The CREATE INDEX statement is used to create indexes on tables in databases, to speed up data retrieval.
MySQL Auto Increment
An auto-increment field is a numeric column that automatically generates a unique number, when a new record is inserted into a table.
MySQL Dates
The most difficult part when working with dates in databases, is to be sure that the format of the date you are trying to insert/select, matches the format of t
MySQL Views
An SQL view is a virtual table based on the result-set of an SQL statement. An SQL view contains rows and columns, just like a real table. The fields in the vie
MySQL Injection
SQL injection is a code injection technique that can destroy your database. SQL injections are a common web hacking technique.
MySQL Prepared Statements
Prepared statements is used to protect a web site from SQL injections.
Ready to go from notes to a real career?
Join CodingNow 2.0's MySQL course — live mentorship, hands-on projects, and 100% placement support in Delhi NCR.
Enroll Now — Free Demo AvailableMySQL Notes – FAQs
What students search before reading MySQL notes.