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