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,
0

1 Answer 1

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.