码迷,mamicode.com
首页 > 数据库 > 详细

mysql操作

时间:2015-12-20 20:40:25      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

create datebase dbname;创建数据库

use dbname;//

create table messages(
id int unsigned primary key auto_increment,
sender varchar(64) not null,
getter varchar(64) not null,
content varchar(3600) not null,
sendTime datetime not null,
isGet tinyint default 0
)

管理员信息表
create table tb_admin(
id int not null auto_increment,--自动编号
name varchar(20) not null,--管理员名称
pwd varchar(20) not null,--管理员密码
primary key(id)
);
insert into tb_admin(name,pwd) values(‘tsoft‘,‘111‘);


create table joys_user(
id int unsigned not null auot_increment primary key,
username varchar(150) not null,
password varchar(100) not null,
name varchar(255) not null,
email varchar(100) not null,
reg_date datetime not null,
last_login_date datetime not null,
active tinyint(1) not null,
params text not null,
idex(name),
unique(username),
unique(email)
)engine=myisam;

 

mysql操作

标签:

原文地址:http://www.cnblogs.com/oracleloyal/p/5061607.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!