I have a table named Assignment
in my Azure SQL Server (version 12.0.1400).
The table itself, as well as most of the columns, have Description
filled in. I've entered those Description
values using the Table Designer in SQL Server Management Studio (SSMS version 18.1 15.0.18131.0).
My problem is that, when I script the table, I only see the Description
of the table, but I can't see the Description
s of columns, which are clearly visible in Object Explorer.
If you look at the screenshot below, you'll see that the table Assignment
, as well as a column, AssignmentId
, have Description
s:
And when I script the table, the resulting SQL code is:
/****** Object: Table [dbo].[Assignment] Script Date: 09-Jul-19 13:52:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Assignment](
[AssignmentId] [varchar](255) NOT NULL,
[HITId] [varchar](255) NOT NULL,
[WorkerId] [varchar](255) NOT NULL,
[HITStatus] [varchar](50) NOT NULL,
[HITTitle] [varchar](1024) NULL,
[HITTypeId] [varchar](1024) NULL,
[HITGroupId] [varchar](1024) NULL,
[HITCreationTime] [datetimeoffset](7) NULL,
[Deadline] [datetimeoffset](7) NULL,
[AcceptTime] [datetimeoffset](7) NULL,
[SubmitTime] [datetimeoffset](7) NULL,
[ApprovalTime] [datetimeoffset](7) NULL,
[RejectionTime] [datetimeoffset](7) NULL,
[AssignmentStatus] [varchar](10) NULL,
[ImageUrl] [varchar](1024) NULL,
[AnswerFreeText] [text] NULL,
[SimpleCheckFinishedTime] [datetime2](7) NULL,
[SimpleCheckStatus] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Assignment] WITH CHECK ADD CONSTRAINT [CK_Assignment_AssignmentStatus_Enumeration_Constraint] CHECK (([AssignmentStatus]='Rejected' OR [AssignmentStatus]='Approved' OR [AssignmentStatus]='Submitted'))
GO
ALTER TABLE [dbo].[Assignment] CHECK CONSTRAINT [CK_Assignment_AssignmentStatus_Enumeration_Constraint]
GO
ALTER TABLE [dbo].[Assignment] WITH CHECK ADD CONSTRAINT [CK_Assignment_HITStatus_Enumeration_Constraint] CHECK (([HITStatus]='Disposed' OR [HITStatus]='Reviewing' OR [HITStatus]='Reviewable' OR [HITStatus]='Unassignable' OR [HITStatus]='Assignable'))
GO
ALTER TABLE [dbo].[Assignment] CHECK CONSTRAINT [CK_Assignment_HITStatus_Enumeration_Constraint]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Assignment data structure represents a single assignment of a HIT to a Worker. The assignment tracks the Worker''s efforts to complete the HIT, and contains the results for later retrieval. ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Assignment'
GO
The only Description
in the resulting SQL script is the one for the table itself, and not for the columns.
I've also checked the options of Object Explorer:
But I still can't get those Description values for columns in the resulting SQL script.
How can I can extract them using Script Table in SQL Server Management Studio?