dbTalk Databases Forums  

Re: List tables extended properties using function fn_listextendedproperty

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: List tables extended properties using function fn_listextendedproperty in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aaron Bertrand - MVP
 
Posts: n/a

Default Re: List tables extended properties using function fn_listextendedproperty - 08-15-2003 , 08:24 AM






Quote:
I would like to list the extended properties of a table using:

select *
from ::fn_listextendedproperty(default, default, default, default,
default,
default, default)
This code, according to the Books Online topic, will list extended
properties for the database. If you don't specify a TABLE NAME, how is the
code supposed to know which table's extended properties you want? Should it
guess, or take the first alphabetical table name, or the last table created,
or ...?

CREATE TABLE dbo.foo(bar INT)
GO

EXEC sp_addExtendedProperty
'description',
'This is what happens when...',
'user',
'dbo',
'table',
'foo',
'column',
'bar'

SELECT
name,
value
FROM
::fn_listextendedproperty
(
NULL,
'user',
'dbo',
'table',
'foo',
'column',
'bar'
)

DROP TABLE foo
GO

Follow-ups set to .programming only -- .dts and .tools dropped.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.