Create table T_ERRORLOGTABLE_TB (eltid int identity (primary) key,--number Elttime Date,--error occurred eltaddress nvarchar (50),- -Error occurrence address eltmessage nvarchar (200)--error message)
--The table comment @value as the comment @leve12name the comment table name exec sys.sp_addextendedproperty @name =n ' ms_description ', @value =n ' error message table ', @ Level0type=n ' SCHEMA ', @level0name =n ' dbo ', @level1type =n ' TABLE ', @level1name =n ' T_ERRORLOGTABLE_TB '--column comments @value annotated content @leve12nane for the comment column name EXEC sys.sp_addextendedproperty @name =n ' ms_description ', @value =n ' number ', @level0type =n ' SCHEMA ', @ Level0name=n ' dbo ', @level1type =n ' TABLE ', @level1name =n ' T_errorlogtable_tb ', @level2type =n ' COLUMN ', @level2name =n ' Eltid '; EXEC sys.sp_addextendedproperty @name =n ' ms_description ', @value =n ' Error date ', @level0type =n ' SCHEMA ', @level0name =n ' dbo ', @level1type =n ' TABLE ', @level1name =n ' T_errorlogtable_tb ', @level2type =n ' COLUMN ', @level2name =n ' elttime '; EXEC sys.sp_addextendedproperty @name =n ' ms_description ', @value =n ' error occurred address ', @level0type =n ' SCHEMA ', @level0name =n ' dbo ', @level1type =n ' TABLE ', @level1name =n ' T_errorlogtable_tb ', @level2type =n ' COLUMN ', @level2name =n ' eltaddress '; EXEC sys.sp_addextendedproperty @name =n ' ms_description ', @value =n ' error message ', @level0type =n ' SCHEMA ', @levEl0name=n ' dbo ', @level1type =n ' TABLE ', @level1name =n ' T_errorlogtable_tb ', @level2type =n ' COLUMN ', @level2name =n ' Eltmessage ';
Create a table with SQL and add comments