Ваши комментарии
I would love to see this specifically for foreign key relations. I would be fantastic if I could define something like this FK_%ForeignTable%_%ReferencingColumn%_%PrimaryTable%
Сервис поддержки клиентов работает на платформе UserEcho
The create table should use the keyword CONSTRAINT not index:
CREATE TABLE DietCalendar (
ID uniqueidentifier NOT NULL,
UserID uniqueidentifier NOT NULL,
EntryDate datetime2 NOT NULL,
CONSTRAINT DietCalendar_pk PRIMARY KEY NONCLUSTERED (ID),
CONSTRAINT UCI_DieteCalendar_UserID_EntryDate_ID UNIQUE CLUSTERED (UserID ASC,EntryDate ASC,ID ASC)
);