sql first understanding

sql is a standard computer language used to access and process databases.


SQL refers to structured query language, an ANSI standard computer language that enables us to access databases.


sql can do:

SQL 面向数据库执行查询
SQL 可从数据库取回数据
SQL 可在数据库中插入新的记录
SQL 可更新数据库中的数据
SQL 可从数据库删除记录
SQL 可创建新数据库
SQL 可在数据库中创建新表
SQL 可在数据库中创建存储过程
SQL 可在数据库中创建视图
SQL 可以设置表、存储过程和视图的权限

SQL is not case sensitive, and a semicolon is used to separate each SQL statement in the database, so that more than one statement can be executed in the same request to the server.


SQL is divided into two parts: Data Manipulation Language (DML) and Data Definition Language (DDL).
The query and update instructions form the DML part of SQL:

SELECT - 从数据库表中获取数据
UPDATE - 更新数据库表中的数据
DELETE - 从数据库表中删除数据
INSERT INTO - 向数据库表中插入数据

The data definition language (DDL) part of SQL gives us the ability to create or delete the
most important DDL statements in table SQL:

CREATE DATABASE - 创建新数据库
ALTER DATABASE - 修改数据库
CREATE TABLE - 创建新表
ALTER TABLE - 变更(改变)数据库表
DROP TABLE - 删除表
CREATE INDEX - 创建索引(搜索键)
DROP INDEX - 删除索引

Guess you like

Origin blog.csdn.net/weixin_52594286/article/details/115055181