zoukankan      html  css  js  c++  java
  • Mysql ---3创建表

    1.创建表:注意:` `  '  '   ,  三种符号   if not exists    primary key(`id`)engine= innodb    charset=utf8

        create table if not exists `stu`

                    `id` int(4) auto_increment  comment '学号',

                    `name` varchar(20) not null default '名字' comment '姓名',

                    `sex`  varchar(2) default null comment '性别',

                    `createtime`  datatime  default current_timestamp ,

                    `updatetime` datatime default current_timestamp on update current_timestamp,

                    primary key(`id`)

                    )engine=innodb default charset=utf8

    datatime  timestamp 区别?

    2.show create database 库名   数据库结构

     show create table 表名  表结构

     desc  student   表字段

    3.数据库引擎InnoDB支持事务、外键约束   Myisam

  • 相关阅读:
    Close doc
    Add to word and save
    xml dataGrideView
    listView save and get
    extract word into string
    DataGrideView DataTable XML
    bookmark
    VB对象的链接与嵌入
    文件系统处理(一)
    既然选择了远方,便只顾风雨兼程
  • 原文地址:https://www.cnblogs.com/chencn/p/12299125.html
Copyright © 2011-2022 走看看