Home  >  Article  >  Database  >  powerdesigner导出脚本细节问题

powerdesigner导出脚本细节问题

WBOY
WBOYOriginal
2016-06-07 15:22:491245browse

love聊网络那点事:http://weibo.com/u/3923942488 步骤:database=GenerateDatabase 导出的脚本需要调整的地方有: mysql5.5测试结果: 1:带有autocreament的字段,主键约束要放在建表语句中,不能在外面通过alter加入。因为该字段必须是主键。 例如: CRE

love聊网络那点事:http://weibo.com/u/3923942488

步骤:database=>GenerateDatabase

导出的脚本需要调整的地方有:
mysql5.5测试结果:
1:带有autocreament的字段,主键约束要放在建表语句中,不能在外面通过alter加入。因为该字段必须是主键。
例如:
CREATE TABLE t_sys_group
(
id INT NOT NULL AUTO_INCREMENT,
group_name VARCHAR(10) NOT NULL,
description VARCHAR(255),
builder VARCHAR(10) NOT NULL,
build_time DATETIME NOT NULL,
PRIMARY KEY(id)
);

#alter table t_sys_group
# add primary key (id);
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn