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. Database & SysAdmin
  3. Database
  4. retrieve all database names

retrieve all database names

Scheduled Pinned Locked Moved Database
database
5 Posts 2 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.
  • Y Offline
    Y Offline
    yuvachandra
    wrote on last edited by
    #1

    Hi all,, Plz let me know the query to retrieve all the databases names present in sqlserver..!or give me some urls to releted topics

    K 1 Reply Last reply
    0
    • Y yuvachandra

      Hi all,, Plz let me know the query to retrieve all the databases names present in sqlserver..!or give me some urls to releted topics

      K Offline
      K Offline
      Krish KP
      wrote on last edited by
      #2

      sp_databases or SELECT * FROM sysdatabases

      Regards KP

      Y 1 Reply Last reply
      0
      • K Krish KP

        sp_databases or SELECT * FROM sysdatabases

        Regards KP

        Y Offline
        Y Offline
        yuvachandra
        wrote on last edited by
        #3

        hello krish....plz let me know the sql query for retrieving the user tables present in the selected database thanqs in advance..

        K 1 Reply Last reply
        0
        • Y yuvachandra

          hello krish....plz let me know the sql query for retrieving the user tables present in the selected database thanqs in advance..

          K Offline
          K Offline
          Krish KP
          wrote on last edited by
          #4

          sysobjects table holds all objects created in the database SELECT * FROM sysobjects WHERE xtype = 'U' xtype column holds object type like U-Table / V-View / P-Storedprocedure /...

          Regards KP

          Y 1 Reply Last reply
          0
          • K Krish KP

            sysobjects table holds all objects created in the database SELECT * FROM sysobjects WHERE xtype = 'U' xtype column holds object type like U-Table / V-View / P-Storedprocedure /...

            Regards KP

            Y Offline
            Y Offline
            yuvachandra
            wrote on last edited by
            #5

            Thanqs Krish...this code sippet is quied for my requirement

            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