我有一个错误
Column 'key' in table 'misc_info' is of a type that is invalid for use as a key column in an index.
Run Code Online (Sandbox Code Playgroud)
其中key是nvarchar(max).一个快速谷歌发现了这一点.然而,它并没有解释什么是解决方案.我如何创建像Dictionary这样的键,其中键和值都是字符串,显然键必须是唯一的并且是单一的.我的sql语句是
create table [misc_info] (
[id] INTEGER PRIMARY KEY IDENTITY NOT NULL,
[key] nvarchar(max) UNIQUE NOT NULL,
[value] nvarchar(max) NOT NULL);
Run Code Online (Sandbox Code Playgroud)