My SQL
My SQL
Installation
User
Login
mysql -u root -pShow Users
SELECT
User,
Host
FROM
MYSQL.USER;Create User
Grant All Privileges On All Databases
Show Grants
Remove Grants
Delete User
Exit
Database
General Commands
Data Types
Integers
Float
Double
Decimal
Date
Date Time
Time
String
Comments
Data Definition Language (DDL)
Create Database
Show Databases
Use Database
Create Table
Show Tables
Show Table Code
Describe Table
Rename Table
Renaming Column
Add Constraint to Column
Add Column
Drop Column
Modify the Datatype of column
Truncate Table
Drop Table
Drop Database
Data Manipulation Language (DML)
Insertion (Complete)
Insertion (Partial)
Updating all rows
Updating a specified row
Delete a specified row
Delete all rows
Data Query Language (DQL)
Display Table
Select only specified columns
Select only few rows
Select with condition
Where Clause
Greater than(>)
Greater than equal to(>=)
Less than(<)
Less than equal to(<=)
Range
BETWEEN and AND
OR
Null
Not null
ORDER BY Clause
Views
Create a view
Displaying view
Updating in view
Deleting record from view
Droping a view
Joins

Inner join
Full outer join
Left outer join
Right outer join
Left outer join - inner join
Right outer join - inner join
Aggregation
Sum function
Average function
Count function
Maximum function
Minimum function
Standard deviation function
Group concat function
Procedure
Creating procedure
Calling procedure
Drop procedure
Transaction
Begin transaction
Create savepoint
Rollback
Releasing savepoint
Commiting changes
Constraints
Not Null
Unique
Primary Key
Check
Default
Cloning
Duplicate a Table Schema
Duplicate a Table
Access Controls
Creating New User
Grant All Permissions
Flush Privileges
Specific User Permissions
Revoking permissions
Show User's Current Permissions
Delete a User
Set new password to a user
Reset Root Password
Programming
Declare variables
Print them
For loop
Miscellaneous
Enabling foreign key checks
Disabling foreign key checks
Round
Repeated concatenation
Random float
Typecast to Int
Concatenation
Extract Month
Extract Year
Also thanks to
Last updated