SHOW ALL DATABASES
pattern
expr
SHOW DATABASES
lists the databases on the MySQL server host.
CREATE DATABASE
db_name
create_specification
create_specification
charset_name
collation_name
CREATE DATABASE
creates a database with the given name. To use this statement, you need the CREATE
privilege for the database. CREATE SCHEMA
is a synonym for CREATE DATABASE
.
DROP DATABASE
DROP {DATABASE | SCHEMA} [IF EXISTS] db_name
DROP DATABASE
drops all tables in the database and deletes the database. Be very careful with this statement! To use DROP DATABASE
, you need the DROP
privilege on the database. DROP SCHEMA
is a synonym for DROP DATABASE
.
SHOW ALL TABLES
db_name
pattern
expr
SHOW TABLES
lists the non-TEMPORARY
tables in a given database.
DROP TABLE
tbl_name
tbl_name
DROP TABLE
removes one or more tables.
CREATE TABLE
tbl_name
create_definition
table_options
partition_options
Or:
tbl_name
create_definition
table_options
partition_options
select_statement
Or:
tbl_name
old_tbl_name
old_tbl_name
create_definition
col_name
column_definition
symbol
index_type
index_col_name
index_option
index_name
index_type
index_col_name
index_option
symbol
index_name
index_type
index_col_name
index_option
index_name
index_col_name
index_option
symbol
index_name
index_col_name
reference_definition
expr
column_definition
data_type
default_value
string
reference_definition
data_type
length
length
length
length
length
length
length
length
decimals
length
decimals
length
decimals
length
decimals
length
decimals
length
charset_name
collation_name
length
charset_name
collation_name
length
length
charset_name
collation_name
charset_name
collation_name
charset_name
collation_name
charset_name
collation_name
value1
value2
value3
charset_name
collation_name
value1
value2
value3
charset_name
collation_name
spatial_type
index_col_name
col_name
length
index_type
index_option
value
index_type
parser_name
reference_definition
tbl_name
index_col_name
reference_option
reference_option
reference_option
table_options
table_option
table_option
table_option
engine_name
value
value
charset_name
collation_name
string
connect_string
absolute path to directory
absolute path to directory
value
value
value
string
tbl_name
tbl_name
partition_options
expr
column_list
expr
column_list
expr
column_list
num
expr
column_list
num
partition_definition
partition_definition
partition_definition
partition_name
expr
value_list
MAXVALUE
value_list
value_list
engine_name
'comment_text'
data_dir
data_dir
index_dir
index_dir
max_number_of_rows
min_number_of_rows
subpartition_definition
subpartition_definition
subpartition_definition
logical_name
engine_name
'comment_text'
data_dir
data_dir
index_dir
index_dir
max_number_of_rows
min_number_of_rows
select_statement:
Some legal select statement
CREATE TABLE
creates a table with the given name. You must have the CREATE
privilege for the table.
for example:
CREATE TABLE account
(
user_Name char(15) not null,
user_Password char(15) not null
);
INSERT INTO account VALUES
(‘xiang’, ‘123456’);
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
· 用 DeepSeek 给对象做个网站,她一定感动坏了
· DeepSeek+PageAssist实现本地大模型联网
· 手把手教你更优雅的享受 DeepSeek
· 腾讯元宝接入 DeepSeek R1 模型,支持深度思考 + 联网搜索,好用不卡机!
· 从 14 秒到 1 秒:MySQL DDL 性能优化实战