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. can somebody help me

can somebody help me

Scheduled Pinned Locked Moved Database
helpdatabase
4 Posts 4 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
    AVI51 0
    wrote on last edited by
    #1

    hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards

    C U S 3 Replies Last reply
    0
    • A AVI51 0

      hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      AVI51 wrote:

      i want to print the column names of a table,i know table name i dont know columns.

      Since you posted this in the SQL forum, I am assuming that what you actually want is a way to get the column names out of the database rather than any particular presentation of the column names. If you are using SQL Server (which you don't say) you can use the views in INFORMATION_SCHEMA SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = @tableName

      Upcoming FREE developer events: * Developer Day Scotland Recent blog posts: * Follow up on hiring a software developer * The Value of Smaller Methods My website | blog

      1 Reply Last reply
      0
      • A AVI51 0

        hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards

        U Offline
        U Offline
        Usharva
        wrote on last edited by
        #3

        try this sp_columns 'TableName'

        1 Reply Last reply
        0
        • A AVI51 0

          hi guys i have some problem regarding sql i want to print the column names of a table,i know table name i dont know columns. thanks in advance regards

          S Offline
          S Offline
          Sunil Wise
          wrote on last edited by
          #4

          you can execute sp_help or 1.you can type the table name in query analyzer 2.select the table name and press alt+f1 keys this works fine for me hope this helps

          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