SQL 有或没有 table 命令?
SQL commands with or without table?
我是 MySQL 的初学者。我发现有些命令在 table 名称之前有 table 一词,而有些则没有。为什么会这样?
与table:
CREATE TABLE <table name>
ALTER TABLE <table name>
DROP TABLE <table name>
没有table:
DESC <table name>
INSERT INTO <table name>
UPDATE <table name>
DML 命令,如 insert
或 update
仅适用于 table,因此 SQL 语言设计者可能没有看到指定单词的意义“table”在那里。
另一方面,create
、alter
或 drop
等 DDL 命令可以应用于多种类型的对象,例如 tables(您提到的) 、视图、索引等,每个都有自己的属性和语法。
我是 MySQL 的初学者。我发现有些命令在 table 名称之前有 table 一词,而有些则没有。为什么会这样?
与table:
CREATE TABLE <table name>
ALTER TABLE <table name>
DROP TABLE <table name>
没有table:
DESC <table name>
INSERT INTO <table name>
UPDATE <table name>
DML 命令,如 insert
或 update
仅适用于 table,因此 SQL 语言设计者可能没有看到指定单词的意义“table”在那里。
另一方面,create
、alter
或 drop
等 DDL 命令可以应用于多种类型的对象,例如 tables(您提到的) 、视图、索引等,每个都有自己的属性和语法。