0

When I run the sp_tables I see a remark field. I know in other SQL programs, I can comment on table, but that's not working in MS SQL Server. I have tried looking this up, but I'm not getting anywhere. I was hoping to be able to use this feature instead of creating a table for a data dictionary.

-- Table Information
exec sp_tables mytable;

-- Want to add to the remark column

-- Comment ode this doesn't work:
comment on table mytable is  'TEST';

Thank you !

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Klynch
  • 1
  • 1
  • 1
    Sounds like what you want a extended properties. – Thom A Sep 16 '21 at 13:24
  • https://learn.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-addextendedproperty-transact-sql?view=sql-server-2017 --> EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'hello table LangTest' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'LangTest' – Ali Fidanli Sep 16 '21 at 13:32
  • Thank you both! I did get it to work in the extended properties by using your comments. I was originally thinking I could populate the remarks field in the SP table itself. – Klynch Sep 16 '21 at 18:58

0 Answers0