Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do you LOOK AT schema? SQL Equiv of DESCRIBE TABLE?

0 views
Skip to first unread message

Timm Taylor

unread,
Mar 2, 2003, 9:13:18 AM3/2/03
to
Hello all,
Oracle has a DESCRIBE TABLE function that SHOWS the current schema. What is
the SQL comparable function? I know about ALTER TABLE.... I just want to SEE
it.

Dan Guzman

unread,
Mar 2, 2003, 10:10:20 AM3/2/03
to
Try:

EXEC sp_help 'MyTable'

Also, you can use the ANSI standard INFORMATION_SCHEMA views for adhoc
metadata queries:

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'dbo' AND
TABLE_NAME = 'MyTable'
ORDER BY ORDINAL_POSITION


--
Hope this helps.

Dan Guzman
SQL Server MVP

-----------------------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
-----------------------

"Timm Taylor" <timm...@bellsouth.net> wrote in message
news:Seo8a.153795$ED.3...@fe06.atl2.webusenet.com...

0 new messages