Visual Studio 2012 でデータベース プロジェクトを作成し、ターゲット プラットフォームを「Windows Azure SQL データベース」に設定しました。次のようなテーブルを追加しました。
CREATE TABLE [dbo].[Organization]
(
[Id] UNIQUEIDENTIFIER NOT NULL PRIMARY KEY NONCLUSTERED IDENTITY,
[Name] NVARCHAR(100) NOT NULL,
[CreationDate] DATETIME NOT NULL DEFAULT GetDate()
)
GO
CREATE CLUSTERED INDEX [IX_Organization_CreationDate] ON [dbo].[Organization] ([CreationDate])
しかし、それは不平を言い続けます:
Error 1 SQL71518: The identity column '[dbo].[Organization].[Id]' must be of data type int, bigint, smallint, tinyint, decimal, or numeric with a scale of 0, and the column must not be nullable. C:\Projects\Gastrology\MGP\trunk\Sources\Cfg.Mgp.Infrastructure.Database\Organization.sql 3 2 Cfg.Mgp.Infrastructure.Database
タイプguidの主キーを作成できない理由を知っている人はいますか? 私は何を間違っていますか?
ありがとう!