Skip to content

常用容易忘记的mysql命令积累(2023-06-28) #43

@yaogengzhu

Description

@yaogengzhu

操作表的常用sql

drop table table_name # 删除表

delete from table_name # 删除表数据但是保留表结构

show create table table_name # 查看create 语句

desc table_name # 查看表结构

show index from table_name # 查看表的索引

alter table table_name convert to character set charset_name;  # 更新表的字符集 
alter table goods convert to character set utf8;  # demo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions