Home >Database >Mysql Tutorial >What are the different commands used in MySQL?
SQL language is divided into four main language statements: DML, DDL, DCL and TCL. Using these statements, we can define the structure of the database by creating and changing database objects, and we can manipulate the data in the tables by updating or deleting. We can also control which users can read/write data or manage transactions to create a single unit of work.
The four main categories of SQL statements are as follows -
DML statements affect records in a table. These are the basic operations we perform on data such as selecting some records from a table, inserting new records, deleting unnecessary records, and updating/modifying existing records.
DML statements include the following-
SELECT – Select records from table
DDL statements are used to change/modify the database or table structure and schema. These statements deal with the design and storage of database objects.
DCL statements control a user's access level to database objects.
TCL statements allow you to control and manage transactions to maintain data integrity within SQL statements.
The above is the detailed content of What are the different commands used in MySQL?. For more information, please follow other related articles on the PHP Chinese website!