1

When the table was created, we used this for the 2 columns in question:

[EffectiveDateUTC] [DATETIME2](7) GENERATED ALWAYS AS ROW START HIDDEN NOT NULL,
[ExpirationDateUTC] [DATETIME2](7) GENERATED ALWAYS AS ROW END HIDDEN NOT NULL,

However, when we right click the table in the object explorer and script table as a create, these 2 columns are missing the HIDDEN keyword. We cannot find any "scripting" option that scripts that. Does anyone have any ideas what I am missing here to get that to be included in the generated script?

The table scripts fine but it does not script the HIDDEN portion for those 2 columns. They come back as:

[EffectiveDateUTC] [DATETIME2](7) GENERATED ALWAYS AS ROW START NOT NULL,
[ExpirationDateUTC] [DATETIME2](7) GENERATED ALWAYS AS ROW END NOT NULL,

1 Answers1

1

Looks like a bug in SQL Server Management Objects (SMO). You can track the issue here.

David Browne - Microsoft
  • 46,306
  • 3
  • 46
  • 96