Use PD to export SQL scripts.
The SQL script exported when no PD is set is:
Create Table DBO. t_call_note (ID int identity (100,1), caller varchar (32) Collate does not null, called varchar (32) Collate does not null, ring_time char (19) Collate does not null, talk_time char (19) Collate character null, end_time char (19) Collate character null, user_no varchar (50) Collate character not null, user_name varchar (50) Collate character not null, talk_long varchar (50) Collate variable null, call_id varchar (50) Collate variable not null, user_pk int collate variable not null, create_time char (19) Collate variable not null, constraint pk_t_call_info primary key (ID) on "primary") on "primary" Go
The preceding SQL statement contains collate chinese_prc_stroke_90_cs_as_ks_ws not null, which is a sort method.
However, an error occurs during SQL Execution. If column is int, an error is returned. If the settings are as follows, the problem is no longer a problem! Haha
1. CLICK: toolbar-> database-> edit current DBMS
2. Select a data source (taking sqlserver2005 as an example)
Microsoft sqlserver2005 \ Script \ Objects \ column \ add
The value of values on the right is:
Powerdesigner code
- % 20: column % [% compute %? As (% compute %): [%. L: datatype % = xml? XML [% xmlschemacollection %? ([% Contenttype %] % xmlschemacollection. generatedname %):]: % 20: datatype %] [. Z: [collate % extcollation %] [% extrowguidcol %? Rowguidcol] [% identity %? % Identity % [[(% extidentityseedinc %)] [% extidtnotforreplication %? Not for replication]: [% extnullconstname %? Constraint % extnullconstname %] [% null %] [% notnull %] [[% extdeftconstname %? Constraint % extdeftconstname %] default %]
- [% Constdefn %]
% 20: column % [% compute %? As (% compute %): [%. L: datatype % = xml? XML [% xmlschemacollection %? ([% Contenttype %] % xmlschemacollection. generatedname %):]: % 20: datatype %] [. Z: [collate % extcollation %] [% extrowguidcol %? Rowguidcol] [% identity %? % Identity % [[(% extidentityseedinc %)] [% extidtnotforreplication %? Not for replication]: [% extnullconstname %? Constraint % extnullconstname %] [% null %] [% notnull %] [[% extdeftconstname %? Constraint % extdeftconstname %] default %] [% constdefn %]
To:
Powerdesigner code
- % 20: column % [% compute %? As (% compute %): [%. L: datatype % = xml? XML [% xmlschemacollection %? ([% Contenttype %] % xmlschemacollection. generatedname %):]: % 20: datatype %] [% extrowguidcol %? Rowguidcol] [% identity %? % Identity % [[(% extidentityseedinc %)] [% extidtnotforreplication %? Not for replication]: [% extnullconstname %? Constraint % extnullconstname %] [% null %] [% notnull %] [[% extdeftconstname %? Constraint % extdeftconstname %] default %]
- [% Constdefn %]
% 20: column % [% compute %? As (% compute %): [%. L: datatype % = xml? XML [% xmlschemacollection %? ([% Contenttype %] % xmlschemacollection. generatedname %):]: % 20: datatype %] [% extrowguidcol %? Rowguidcol] [% identity %? % Identity % [[(% extidentityseedinc %)] [% extidtnotforreplication %? Not for replication]: [% extnullconstname %? Constraint % extnullconstname %] [% null %] [% notnull %] [[% extdeftconstname %? Constraint % extdeftconstname %] default %] [% constdefn %]
The modified content is removed:[. Z: [collate % extcollation %]And the last"]"
If you export the SQL script again, collate chinese_prc_stroke_90_cs_as_ks_ws not null will not appear.
As follows:
SQL code
Create Table DBO. t_call_note (ID int identity (100,1), caller varchar (32) not null, called varchar (32) not null, ring_time char (19) not null, talk_time char (19) null, end_time char (19) null, user_no varchar (50) not null, user_name varchar (50) not null, talk_long varchar (50) null, call_id varchar (50) not null, user_pk int not null, create_time char (19) not null, constraint pk_t_call_info primary key (ID) on "primary") on "primary" Go
I hope there will be a better way.
Customer Management Software
Http://www.xingzhu.net.cn
Star candle Software
Http://www.xzrj.net