search
HomeDatabaseMysql TutorialWhat are the types of SQL commands?
What are the types of SQL commands?Jan 21, 2019 am 11:18 AM
ddldmlsql commandtcl

SQL commands are mainly divided into 4 types: DDL (data definition language), DML (data manipulation language), DCL (data control language), TCL (transaction control language). Let me give you a brief understanding of these four types. I hope it will be helpful to you.

What are the types of SQL commands?

Structured Query Language (SQL) is well known as database language and we can use it to perform certain operations on existing database and we can also use language to create databases. SQL uses certain commands like Create, Drop, Insert, etc. to perform the required tasks. [Recommended related video tutorials: MySQL Tutorial]

These SQL commands are mainly divided into four categories. Let’s briefly introduce them to you:

DDL (Data Definition Language)

DDL or Data Definition Language actually consists of SQL commands that can be used to define a database schema. It simply deals with the description of the database schema and is used to create and modify the structure of database objects in the database.

Commonly used DDL commands:

CREATE: Used to create a database or its objects (such as tables, indexes, functions, views, stored procedures and triggers).

DROP: Used to delete objects from the database.

ALTER: used to change the structure of the database.

TRUNCATE: Used to delete all records from the table, including all spaces assigned to the records.

COMMENT: Used to add comments to the data dictionary.

RENAME: Used to rename objects existing in the database.

DML (Data Manipulation Language)

SQL commands that handle data manipulation existing in the database belong to DML or data manipulation language. This includes large Most SQL statements.

Commonly used DML commands:

SELECT: used to retrieve data from the database.

INSERT: Used to insert data into the table.

UPDATE: Used to update existing data in the table.

DELETE: Used to delete records from the database table.

DCL (Data Control Language)

DCL includes commands such as GRANT and REVOKE, which mainly handles permissions, permissions and other controls of the database system.

Commonly used DCL commands:

GRANT: Grant users access to the database.

REVOKE: Use the GRANT command to extract the user's access rights.

TCL (Transaction Control Language)

TCL commands process transactions in the database.

Commonly used TCL commands:

COMMIT: Submit the transaction.

ROLLBACK: Roll back the transaction in case of any error.

SAVEPOINT: Set the save point in the transaction.

SET TRANSACTION: Specifies the characteristics of the transaction.

The above is the entire content of this article, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !

The above is the detailed content of What are the types of SQL commands?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
IFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in sizeIFA 2024 | TCL\'s NXTPAPER 14 won\'t match the Galaxy Tab S10 Ultra in performance, but it nearly matches it in sizeSep 07, 2024 am 06:35 AM

Alongside announcing two new smartphones, TCL has also announced a new Android tablet called the NXTPAPER 14, and its massive screen size is one of its selling points. The NXTPAPER 14 features version 3.0 of TCL's signature brand of matte LCD panels

TCL推出两款NXTPAPER 3.0安卓平板,打造更接近纸质书阅读体验TCL推出两款NXTPAPER 3.0安卓平板,打造更接近纸质书阅读体验Jan 16, 2024 pm 04:03 PM

本站1月10日消息,TCL在CES2024大展上,推出了NXTPAPER14Pro和Tab10NXTPAPER5G两款平板,最大的亮点在于采用全新的NXTPAPER3.0显示技术,提供更接近印刷书籍的护眼观看体验。TCLNXTPAPER14ProTCLNXTPAPER14Pro是一款配备了14英寸2.8K屏幕的设备。它采用了全新的圆偏振光(CPL)技术,模拟了自然光在纸上的反射效果。这样的设计不仅可以减少眼睛疲劳,还能保持鲜艳的色彩和对比度。TCLNXTPAPER14Pro提供了专门的阅读模式,

IFA 2024 | New TCL 50 NXTPAPER smartphones launch with dedicated buttons for activating a quasi-E Ink modeIFA 2024 | New TCL 50 NXTPAPER smartphones launch with dedicated buttons for activating a quasi-E Ink modeSep 06, 2024 am 06:56 AM

TCL is expanding its TCL 50 series of smartphones with two new models. Announced at IFA 2024, the TCL 50 Pro NXTPAPER 5G and the TCL 50 NXTPAPER 5G not only come with TCL's signature NXTPAPER technology but also have a slider on the side that practic

TCL 将 AirPlay 2 和 Homekit 添加到其更新的 Google TV 阵容中TCL 将 AirPlay 2 和 Homekit 添加到其更新的 Google TV 阵容中Apr 13, 2023 pm 08:10 PM

TCL 推出了一批相当可靠的 4K 电视,开始涉足 Google TV 体验。本月早些时候,该品牌在欧洲更新了该阵容,直到现在还没有被关注的一个细节是整个阵容都支持 Apple 的 AirPlay 2 和 Homekit。正如 FlatPanelsHD 的人们在一次私人演示中所报道的那样,TCL 将在欧洲销售的部分谷歌电视型号上支持 AirPlay 2 和 Homekit。TCL 系列的 C735、C835 和 C935 型号将支持 Apple 的两种标准,允许 iOS 用户镜像他们的显示器和投

TCL与德国国家足球队达成合作,推出个性化球衣展示TCL与德国国家足球队达成合作,推出个性化球衣展示Oct 11, 2023 pm 06:29 PM

本站10月11日消息,近日,TCL在德国柏林正式宣布携手德国足球协会(DFB),成为德国国家男子足球队欧洲及大中华区官方合作伙伴。本次合作,TCL将获得德国国家男子足球队电视、音箱和空调全线智能产品的专属品牌推广权,并在德国国家队的新闻发布会和赛事中展示TCL品牌标识和宣传广告。双方还展示了带有TCL标识的定制球衣。根据本站查询,TCL在足球领域有多个合作伙伴。TCL与南美足协合作成为南美解放者杯的全球官方合作伙伴,并与西班牙国家足球队、意大利国家足球队合作成为它们的全球官方合作伙伴。此外,TC

TCL电视机支持投屏吗TCL电视机支持投屏吗Jun 25, 2023 am 10:30 AM

TCL电视机支持投屏,具体操作步骤如下:1、在电视应用上打开投屏,再将手机和电视连接同一个网络;2、在手机上找到要投屏到电视上的视频,打开播放,点击右上角的三个点,弹出菜单选项;3、在菜单中选择投屏后开始搜索设备,连接即可;4、手机投屏完成后,电视开始播放投屏内容中的视频。

开启高品质生活:TCL 双子舱洗烘护集成机 T10 双十一优惠购正式启动开启高品质生活:TCL 双子舱洗烘护集成机 T10 双十一优惠购正式启动Nov 01, 2023 pm 03:25 PM

现在的消费者选购电器产品,早已不只是看产品的实用性和耐用性,而是讲求舒适、高效的操作体验,优雅大气的外观以及能否满足对高品质生活的幸福感。比如洗衣机作为传统家电的一大品类,如今已经发展到集洗涤、烘干、护理的多功能集合体,在洗衣的细分痛点需求上不断与时俱进。重新写作如下:当然,随着功能的增加,产品的定位也越来越高端,价格也会相应上涨。在产品能够满足各种功能的同时,人们肯定希望价格亲民,并且有可靠的售后服务。趁着双十一大促销活动,今天小编给大家推荐一款各方面素质都很不错的洗烘护集成机:TCL双子舱T

mysql的DML进阶、分页查找、SQL约束及多表操作方法mysql的DML进阶、分页查找、SQL约束及多表操作方法May 31, 2023 pm 07:10 PM

一.什么是DML,以及DML基本操作,表的列和行的跟新操作针对列进行修改操作#首先简单的创建一个student表为后序操作做准备usetest;createtablestudent(idint,namevarchar(8),agetinyint)engine=innodbdefaultcharset=utf8mb4;descstudent;添加新的列,格式:altertable表名add新列名数据类型(长度);altertablestudentaddaddrvarchar(20);#新增一个ad

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version