CREATE USER
|
Creates users to access databases. |
|
|
CREATE DATABASE
|
Creates a new database. |
|
|
CREATE TABLE
|
Creates a new table. |
|
|
DROP USER
|
Delete users from the database server. |
|
|
DROP DATABASE
|
Deletes the database along with the data present in it. |
|
|
DROP TABLE
|
Deletes the table along with the data present in it. |
|
|
SHOW USER
|
Displays a list of users who have access to the database. |
|
|
SHOW DATABASE
|
Displays a list of databases created until present. |
|
|
SHOW TABLE
|
Displays a list of tables created in the database until present. |
|
|
SHOW COLUMNS
|
Displays all the columns present in the database. |
Or:
|
Or:
|
USE DATABASE
|
Tells the system which database to be chosen to perform actions. |
|
|
ALTER TABLE
|
Modifies tables by adding, deleting, or modifying data in columns. |
|
|
DESCRIBE TABLE
|
Displays the structure of the table consisting of column names, data types, keys, and default values. |
|
|
TRUNCATE TABLE
|
Deletes only the data present in tables without deleting the table. |
|
|
RENAME DATABASE
|
Renames a database. |
|
|
RENAME TABLE
|
Renames a table. |
|
|
CHANGE COLUMNS
|
Changes column names of a table. |
Or: To change multiple column names with the CHANGE query:
|
Or: To change multiple column names with the CHANGE query:
|
RENAME COLUMNS
|
Renames columns present in a table. |
Or:
To change multiple column names with RENAME query:
|
Or:
|
INSERT INTO
|
Inserts new records into a table. |
Or:
|
|
UPDATE TABLE
|
Modifies the existing data items in a table. |
|
|
DELETE COLUMNS
|
Deletes column in the table. |
Or:
To drop multiple columns:
|
Or:
To drop multiple columns:
|
ADD COLUMN |
Adds a new column in the table. |
Or:
To add after a particular column:
Or: To add multiple columns:
|
Or:
To add after a particular column:
Or:
To add multiple columns:
|
SELECT
|
Selects data values from a database and stores the data returned as output in the result set. |
|
|
SELECT FROM
|
Retrieves data values from a table. |
|
|
SELECT DISTINCT |
Returns only distinct values from the database. |
|
|
SELECT WHERE
|
Filters data based on conditions. |
|
|