Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to Retrieve the Structure of DataBase

How to Retrieve the Structure of DataBase

Scheduled Pinned Locked Moved ASP.NET
databasetutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aswini
    wrote on last edited by
    #1

    Hello. I want to retreive the structure of database... Rquirement is : when i select the table name, it should give the details of tables like the columns it contains, rows etc in which database it is present et c

    Aswini

    M J 2 Replies Last reply
    0
    • A aswini

      Hello. I want to retreive the structure of database... Rquirement is : when i select the table name, it should give the details of tables like the columns it contains, rows etc in which database it is present et c

      Aswini

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      SQL ~ Execute this T-SQL to get the columns of your table.. SELECT column_name FROM information_schema.columns WHERE table_name = @table_name AND table_schema = @owner_name ORDER BY ordinal_position

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."

      1 Reply Last reply
      0
      • A aswini

        Hello. I want to retreive the structure of database... Rquirement is : when i select the table name, it should give the details of tables like the columns it contains, rows etc in which database it is present et c

        Aswini

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        there are few system stored procs that returns the inforamtion about the database objects. take a look at those. sp_databases sp_tables sp_columns

        - Regards -
           JON


        Life is not measured by the amount of breaths we take, but by the moments that take our breath away.


        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups