zoukankan      html  css  js  c++  java
  • 【数据库使用】mysql基本使用

    mysql启动

    ../bin/mysqld --defaults-file=./mysql/my.cnf --user=root

    这里的--user是什么意思呢

    mysql创建一个数据表student,需要有3个字段:id、name、age,其中指定唯一的索引是id。

    mysql> create table student(
        -> id int not null,
        -> name varchar(16) not null,
        -> age int not null,
        -> unique index idx (id)
        -> );
    

      查看数据表:

    mysql> desc teacher;
    +-------+-------------+------+-----+---------+-------+
    | Field | Type        | Null | Key | Default | Extra |
    +-------+-------------+------+-----+---------+-------+
    | id    | int(11)     | NO   | PRI | NULL    |       |
    | name  | varchar(16) | NO   |     | NULL    |       |
    | age   | int(11)     | NO   |     | NULL    |       |
    +-------+-------------+------+-----+---------+-------+
    3 rows in set (0.00 sec)
    

      查看索引

    mysql> show index from teacherG;
    *************************** 1. row ***************************
            Table: teacher
       Non_unique: 0
         Key_name: idx
     Seq_in_index: 1
      Column_name: id
        Collation: A
      Cardinality: 0
         Sub_part: NULL
           Packed: NULL
             Null: 
       Index_type: BTREE
          Comment: 
    Index_comment: 
    1 row in set (0.00 sec)
    
    ERROR: 
    No query specified
    

      

    大道至简
  • 相关阅读:
    移动端的dl
    以resnet作为前置网络的ssd目标提取检测
    MobileNet V2
    axis
    后RCNN时代的物体检测及实例分割进展
    RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
    caffe2安装
    git学习
    各种各样的卷积核
    数字图像处理_基础知识
  • 原文地址:https://www.cnblogs.com/liurong07/p/10407096.html
Copyright © 2011-2022 走看看