Symptom:
Today, when I used powerdesigner 16 to design a database, the exported SQL statement was executed in SQL Server, which was suddenly miserable, crazy, and even intended to commit suicide !!!
For an error like a question, see the following SQL statement:
Create Table DBO. t_call_note (ID Int Identity ( 100 , 1 ), Name Char ( 19 ) Collate chinese_prc_stroke_90_cs_as_ks_ws Not Null , PWD Char ( 19 ) Collate chinese_prc_stroke_90_cs_as_ks_ws Null , Constraint Pk_t_call_info Primary Key (ID) On " Primary ") On " Primary " Go
Sqlserver reports an error: collate chinese_prc_ci_as...
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.
Solution:
1. CLICK: toolbar-> database-> edit current DBMS
2. Select a data source (taking sqlserver2005 as an example)
Microsoft sqlserver2005 \ Script \ Objects \ column \ add
Insert the following in location 3Code:
% 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 % Default % ]
[ % Constdefn % ] ]
Save it.
Regenerate... No more .. Collate chinese_prc_ci_as
Surprise !!!!
Author:Memories of lost youthSource:Http://www.cnblogs.com/lukun/The copyright of this article is shared by the author and the blog. You are welcome to repost this article, but you must keep this statement without the author's consent andArticleThe original text connection is displayed at an obvious location on the page. If you have any problems, you can useHttp://www.cnblogs.com/lukun/ Thank you very much for contacting me.