Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, Is it possible to get metadata (i.e. descriptions of tables etc.) in sql-server? In Oracle you can retrieve this information with tables like all_objects, user_tables, user_views etc. For example, this query selects the owner of the table 'ret_ods_test' (in Oracle!): select owner from all_objects where object_name = 'ret_ods_test' What's the equivalent in sql server? Thanks a lot.
Post Follow-up to this messageHere are some equivalent queries: SELECT TABLE_SCHEMA FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='YourTabl e' SELECT USER_NAME(uid) FROM sysobjects WHERE name='YourTable' Razvan
Post Follow-up to this message"Shiva" <gonzo@shiva.com> wrote in message news:dcdc2n$2nt$1@br utus.eur.nl... > Hi, > > Is it possible to get metadata (i.e. descriptions of tables etc.) in > sql-server? In Oracle you can retrieve this information with tables like > all_objects, user_tables, user_views etc. For example, this query selects > the owner of the table 'ret_ods_test' (in Oracle!): > > select owner > from all_objects > where object_name = 'ret_ods_test' > > What's the equivalent in sql server? > > Thanks a lot. > > See sp_help, sysobjects, syscolumns, "Meta Data Functions", and the INFORMATION_SCHEMA views in Books Online. Simon
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread