Re: Description in the table

From: Hari (hari_prasad_k_at_hotmail.com)
Date: 02/23/04


Date: Mon, 23 Feb 2004 14:47:06 +0530

Hi,

All the extended properties will be stored in "sysproperties" system table
of each database.

Eg:

CREATE table test (id int , name char (20))
go
EXEC sp_addextendedproperty 'caption', 'Employee ID', 'user', dbo,
'table', 'test', 'column', id
go
EXEC sp_addextendedproperty 'caption', 'Employee Name', 'user', dbo,
'table', 'test', 'column', name
go
select * from sysproperties where object_name(id)='test'

Instead of querying the system tables use the below code using functions to
get the extended properties,

SELECT *
FROM ::fn_listextendedproperty (NULL, 'user', 'dbo', 'table', 'test',
'column', default)

Thanks
Hari
MCDBA

"Itzik" <itzikm@pisgasys.co.il> wrote in message
news:4039be37$1@news.bezeqint.net...
> Hello
> i have description in column of my table for example:
>
> Table:
> Tbl1
> Columns:
> col1 (description: Important column)
> col2
>
> Where SQL Server save this information of column description
> (Tbl1.col1.description) ?
> Can i access to this information ?
>
> Thank you
>
>



Relevant Pages

  • Re: column description?
    ... EXEC sp_addextendedproperty 'caption', 'Employee ID', 'user', dbo, ...
    (microsoft.public.sqlserver.server)
  • field description
    ... EXEC sp_addextendedproperty 'caption', 'Employee ID', 'user', dbo, ...
    (microsoft.public.sqlserver.programming)
  • Stored Procedure Question
    ... CREATE TABLE Employees ( ... EXEC sp_addextendedproperty 'caption', 'Employee Name', 'user', dbo, 'table', Employees, 'column', Name ...
    (microsoft.public.sqlserver.msde)
  • Re: Workplace discrimination: amount to sue
    ... Employee should first take the case to the Equal Employment Opportunity ... angry exec won't get you there. ... senior manager is due to be retiring soon, and withholding retirement ... pension plans could be designed to ...
    (misc.legal)
  • Re: Error 21776: after transferring databases
    ... >EXEC sp_changedbowner 'TempDBOwner' ... >> I transferred databases from SSSrvr to FRXSrvr. ... >> DBO by correcting the SID. ...
    (microsoft.public.sqlserver.security)

Loading