• ADADADADAD

    mysql如何清空表中的数据库[ mysql数据库 ]

    mysql数据库 时间:2024-12-03 10:28:27

    作者:文/会员上传

    简介:

    mysql如何清空表中的数据库1.进入MySQLmysql -hlocalhost -uroot -p 2.查询数据库中所有表名 select table_name from information_schema.tables where table_schema='

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    mysql如何清空表中的数据库

    1.进入MySQL

    mysql -hlocalhost -uroot -p

    2.查询数据库中所有表名

    select table_name from information_schema.tables where table_schema='DB_name' and table_type='base table';

    3.查询数据库中指定表的所有字段名

    select column_name from information_schema.columns where table_schema='DB_name' and table_name='users'

    4.清空数据库中表的数据

    truncate table 表名 ;
    mysql如何清空表中的数据库.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysql