Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7883323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:30:04+00:00 2026-06-03T04:30:04+00:00

I need to retrieve information from SQL Server from structure point of view example:

  • 0

I need to retrieve information from SQL Server from structure point of view

example: I need to list all database, all procedures, all parameters from procedures, all column name from tables, column type from table columns.

How would be the approach to do that?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:30:06+00:00Added an answer on June 3, 2026 at 4:30 am

    There are (at least) three ways.

    1. Use the DatabaseMetaData class. There’s a lot in there, so for details see the Java Docs. I believe this is the preferred way, as it is standard across all database engines. So if you switch to a different database engine, it shoudl still work, and what you learn about how to use it will apply whether you are working on this db engine or another.

    2. Do queries against the “information_schema”. Basically this is a database with information about the database structure. It has tables listing all the tables, all the columns, etc. This is the second-best choice. The information_schema is more or less standard across databases. Unfortunately, the implementation for MS SQL Server is not the best.

    3. Do queries against the “system tables” and/or “system views”. There are a set of tables in MS SQL Server with information about the database structure. Like information_schema, but it’s specific to MS SQL Server and thus includes metadata for things that are not part of standard SQL, like calculated fields and identity columns. It’s also more complete and reliable than MS’s implementation of information_schema.

    For really general stuff, like what tables are in the DB or what columns are in a given table, information_schema and the system tables are equally good and useful. But if you need much of anything else, MS’s implementation of the information_schema quickly proves inadequate. I’ve seen lots of comments on the Web encouraging developers to use the system tables rather than the information_schema. I don’t like to use non-standard stuff, as both the code itself and the experience gained are not portable, but in this case, I think they’re right: use the system tables.

    But DatabaseMetaData is better yet, if it gives you what you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to retrieve random rows from SQL Server database. I am looking for
I need to retrieve information from a SQL server and insert into a XML
I need to retrieve data from MsAccess/SQL Server (two separate projects in which I
I need to retrieve some information from a Liferay server with Javascript. I build
I'm using Data::Dumper to retrieve information from a server with SOAP messaging and need
I need to retrieve all rows from a table where 2 columns combined are
I need to retrieve a record from a database, display it on a web
I need to retrieve data from two tables. the first is a list of
I need to retrieve a set of Widgets from my data access layer, grouped
I need to retrieve, in my Win32 standalone program, a list of currently installed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.