学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
轻松建立自己的群组,招兵买马   
发新话题
打印

Mysql中创建联合主键

Mysql中创建联合主键

多个字段联合起来一起作主键用unique(键值1,键值1)

TOP

create table t_test(
id int,
col1 int,
col2 int,
unique key(id,col1,col2)
);
drop table t_test;

这样子吗?.
我的msn: myfend@hotmail.com

TOP

发新话题