• mysql基本命令


    1、  查看库列表

    mysql> show databases;

    +--------------------+

    | Database           |

    +--------------------+

    | information_schema |

    | mysql              |

    | performance_schema |

    | test               |

    | wordpress          |

    +--------------------+

    5 rows in set (0.00 sec)

    mysql库是MYSQL的系统信息,包含账号信息

    2、  查看库中的表

    mysql> use wordpress;   #切换到wordpress库

    Database changed

    mysql> show tables;     #显示该库中的所有表信息

    +--------------------------+

    | Tables_in_wordpress      |

    +--------------------------+

    | wp_commentmeta           |

    | wp_comments              |

    | wp_huge_itslider_images  |

    | wp_huge_itslider_params  |

    | wp_huge_itslider_sliders |

    | wp_links                 |   

    +--------------------------+

    17 rows in set (0.00 sec)

    3、  显示表的结构

    use 库名;

    desc 表名;

    4、  建库:
       create database 库名;

    5、  建表:
       use 库名;
       create table 表名(字段设定列表);

    6、  删库和删表:
       drop database 库名;
       drop table 表名;

    7、  将表中记录清空:
       delete from 表名;

    8、  显示表中的记录:
       select * from 表名;

  • 相关阅读:
    Windows 上如何安装Sqlite
    StringBuffer类讲解
    Android Debug Bridge(adb)百度
    0117调试 (Logout调试)
    android cmd adb shell 出现 Device offline的状态下
    菜鸟:为什么要用不同的包 android
    0105Activity+Intent
    adb shell 后感
    0116sqlite
    iptables
  • 原文地址:https://www.cnblogs.com/wnfindbug/p/4836198.html
Copyright © 2020-2023  润新知