Create table FavoriteDish
(
FavID int identity (1,1) primary key not null,
DishID int references Dishes(DishID) not null ,
CelebrityName nvarchar(100) nonclustered not null
)
此结果Incorrect syntax near the keyword 'nonclustered'
。 我引用了MSDN对create table语法的帮助。我不知道这里有什么问题。如何在创建表中创建非聚集索引?
的[创建CREATE TABLE语句中使用SQL Server非聚簇非唯一索引(可能的复制http://stackoverflow.com/questions/6193293/create-a-nonclustered-non-unique-index -within-the-create-table-statement-with-sq) – AaronLS 2016-06-01 22:56:27
@AaronLS首先询问这个特定问题的含义是否早于您指向的问题。这意味着你指向的那个可以被称为这个的重复,而不是反之亦然 – 2017-04-13 09:58:03