Welcome to the Windows community forum and interact with 3 million technical staff to enter the environment: xpsp3, sqlserver20081, SQL Server statement to annotate the table EXECUTEsp_addextendedpropertyNMS_Description, N table annotation, Nuser, Ndbo, Ntable, N table name, NULL, NULL2, SQL Server statement
Welcome to the Windows community forum and interact with 3 million technical staff> enter the environment: xp sp3, SQL server2008 1. use SQL Server statements to comment out EXECUTE sp_addextendedproperty N 'Ms _ description' to the table ', N 'table comment ', N 'user', N 'dbo', N 'table', N 'table name', NULL, NULL 2. SQL server uses a statement
Welcome to the Windows community forum and interact with 3 million technicians>
Environment: xp sp3, SQL server2008
1. SQL server uses statements to comment on tables
EXECUTE sp_addextendedproperty N 'Ms _ description', N 'table annotation', N 'user', N 'dbo', N 'table', N 'table name', NULL, NULL
2. "field" comment for the table using SQL Server statements
EXECUTE sp_addextendedproperty N 'Ms _ description', N 'field annotation', N 'user', N 'dbo', N 'table', N 'table name ', N 'column ', N 'field name'
3. View sqlserver comments
SELECT
A. name AS table_name,
B. name AS column_name,
C. value AS column_description
FROM sys. tables
Inner join sys. columns B on B. object_id = A. object_id
Left join sys. extended_properties c on c. major_id = B. object_id and c. minor_id = B. column_id
Where a. name = 'table name'