467,917 Members | 1,402 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,917 developers. It's quick & easy.

SQL Server 2005 Metadata

N002213F
Does SQL Server 2005 have system tables that you can select to see meta data about a table? I have seem such tables in Oracle.

I would like to retrieve certain tables properties for analysis and comparisons

Any pointers most appreciated
Oct 27 '08 #1
  • viewed: 1811
Share:
5 Replies
debasisdas
Expert 4TB
yes those are also available here.
Oct 27 '08 #2
N002213F
Some names or web page might help.

Thanks in advance
Oct 27 '08 #3
ck9663
Expert 2GB
Depending on the version of SQL Server you're working on, there's a table called sysobjects.

If you're working with SQL 2005, there's a view called sys.tables

So, try the following:

Expand|Select|Wrap|Line Numbers
  1. select * from sys.tables
  2.  
  3. select * from sysobjects

-- CK
Oct 27 '08 #4
N002213F
Found it;
Expand|Select|Wrap|Line Numbers
  1. SELECT NAME FROM SYS.TABLES ORDER BY NAME
and
Expand|Select|Wrap|Line Numbers
  1. EXEC SP_SPACEUSED[TABLENAME]
I used Java to do the the looping, will look at using SQL procedures.
Oct 28 '08 #5
N002213F
Depending on the version of SQL Server you're working on, there's a table called sysobjects.

If you're working with SQL 2005, there's a view called sys.tables

So, try the following:

Expand|Select|Wrap|Line Numbers
  1. select * from sys.tables
  2.  
  3. select * from sysobjects

-- CK
Thanks, if selecting from the sysobjects, one may have to specify the type, lest you get all the objects.
Oct 28 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Carl | last post: by
4 posts views Thread by jas | last post: by
16 posts views Thread by Omar Abid | last post: by
reply views Thread by Desmodromic | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.