The SQL column generated by PD settings does not contain collate chinese_prc_ci_as

Source: Internet
Author: User
Tags powerdesigner

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
  1. % 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 %]
  2. [% 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
  1. % 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 %]
  2. [% 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.