简体   繁体   English

将varchar转换为nvarchar mysql的问题

[英]Issue Converting varchar to nvarchar mysql

Sorry if this is an easy question, I am coming to MySQL from SQL Server. 抱歉,如果这是一个简单的问题,我将从SQL Server进入MySQL。

When I execute my create statement it contains nvarchar but commits to the database as varchar. 当我执行create语句时,它包含nvarchar,但作为varchar提交到数据库。 Even in my alter statement afterwards the column does not change at all. 即使在之后的我的alter语句中,该列也完全不会更改。 Does the collation or DB engine make a difference? 排序规则或数据库引擎是否有所作为?

During execution I am not encountering any issues in results, other than the fact the column changes datatype. 在执行期间,除列更改数据类型的事实外,结果没有遇到任何问题。 I attached a screencast of my activity http://screencast.com/t/wc94oei2 我附上了我的活动的截屏视频http://screencast.com/t/wc94oei2

I have not been able to find anyone with similar issues through my Google searches 我无法通过Google搜索找到任何存在类似问题的人

Did you mean, this.. 你是说这个吗

CREATE TABLE stars ( idstars int(11) NOT NULL AUTO_INCREMENT, Name nvarchar(200) DEFAULT NULL, PRIMARY KEY ( idstars ), UNIQUE KEY Name_UNIQUE ( Name ) ) ----turns to--- CREATE TABLE stars ( idstars int(11) NOT NULL AUTO_INCREMENT, Name varchar(200) DEFAULT NULL, PRIMARY KEY ( idstars ), UNIQUE KEY Name_UNIQUE ( Name ) ) 创建表starsidstars int(11)NOT NULL AUTO_INCREMENT, Name nvarchar(200)DEFAULT NULL,主键( idstars ),唯一键Name_UNIQUEName ))----转到---创建表starsidstars int( 11)NOT NULL AUTO_INCREMENT, Name varchar(200)DEFAULT NULL,PRIMARY KEY( idstars ),UNIQUE KEY Name_UNIQUEName ))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM