Chinaunix首页 | 论坛 | 博客
  • 博客访问: 659018
  • 博文数量: 121
  • 博客积分: 1425
  • 博客等级: 中尉
  • 技术积分: 2059
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-03 15:34
文章分类

全部博文(121)

文章存档

2018年(1)

2017年(2)

2016年(1)

2015年(11)

2014年(14)

2013年(47)

2012年(45)

分类: Mysql/postgreSQL

2014-11-06 15:21:33

(key是索引,constraint是约束,foreign key是外键,references是应用什么表的主键)

create table tb_user_role(id_user int(10) not null,key id_user(id_user),constraint id_user foreign key (id_user) references user_table (id))engine=Innodb default charset=utf8;
阅读(1212) | 评论(0) | 转发(0) |
0

上一篇:linux install postgresql

下一篇:rbac 学习

给主人留下些什么吧!~~