1. 程式人生 > >MySQL筆記(1)

MySQL筆記(1)

arch email utf null amp ima key big 查看

一、數據庫操作
1.查看數據庫
show databases
2.創建數據庫
create database kameng;
3.進入數據庫
use kameng;
4.刪除數據庫
drop database kameng;
二、表操作:
1.查看表
show tables;
2.創建表(innodb,myisam,memory)
create table users(
id bigint not null auto_increment primary key,
email varchar(60) not null,
pwd varchar(60) not null,
nicheng varchar(60) not null,
createtime timestamp not null,
updtime timestamp not null,
unique key emailuniq (email),
unique key nichenguniq (nicheng)
)ENGINE=innodb DEFAULT CHARSET=utf8;

MySQL筆記(1)