• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SQL Query Problem

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai friends,
I need some help.

I know the name of database.How can I query to get the details of tables , stored procedures and views corresponding to this database.

I just know the name of stored procedures is stored in the sysobjects system table and the text is stored in the syscomments system table in the current database.
But I don't know to access it with only knowing the database name.I am using ms sql server.

Ram Mohan.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ram Mohan:

I know the name of database.How can I query to get the details of tables , stored procedures and views corresponding to this database.

I just know the name of stored procedures is stored in the sysobjects system table and the text is stored in the syscomments system table in the current database.
But I don't know to access it with only knowing the database name.I am using ms sql server.



Run this query in analyser pointing to ur Database.

note the xtype, This will tell u if the object is table or view or whatever.
things i know are
PK - primary Key
U - tables
V - views
F - foreign Keys
 
Ram Mohan
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thankyou Ram It gives me the LIFE.

Ram Mohan.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic