show databases;
use mysql;
show tables;
select * from user;
\q
create database 表名; 创建一个表
use 表名;
create table data11(showtime time);造一个表名为tata11的表格,列明为showtime,储存time类型
insert into data11 values()()(); 插入一个三行的。。。数据
select * from data11;
自增 唯一 不为空 设置自增需要三者全设
auto_increment unique not null
最大值加一
主键是最快的 唯一是单列
主键可以多列组合成一个主键
如果要兼容中文就用
create table 表名(那么 char(20)) default charset=utf8;
实例
create table xxx
(ID int auto_increment unique not null,
name varchar(20),
password varchar(20),
telephone int unsigned,
rank bool,
adress varchar(100),
note varchar(100)
default '0',cost double)default charset=utf8;