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 column length

retrieve column length

Scheduled Pinned Locked Moved Database
databasequestion
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.
  • G Offline
    G Offline
    Garth
    wrote on last edited by
    #1

    Is there a quick way of running an SQL query that will provide the maximum length of data that can go in a particular column? I created a table, and want to be able to limit text input so that the maximum field length is not exceeded

    M N 2 Replies Last reply
    0
    • G Garth

      Is there a quick way of running an SQL query that will provide the maximum length of data that can go in a particular column? I created a table, and want to be able to limit text input so that the maximum field length is not exceeded

      M Offline
      M Offline
      Mauricio Ritter
      wrote on last edited by
      #2

      if you´re using ADO, you can use the DefinedSize propertie. Mauricio Ritter - Brazil Sonorking now: 100.13560 Trank

      1 Reply Last reply
      0
      • G Garth

        Is there a quick way of running an SQL query that will provide the maximum length of data that can go in a particular column? I created a table, and want to be able to limit text input so that the maximum field length is not exceeded

        N Offline
        N Offline
        notadood
        wrote on last edited by
        #3

        If you are using SQL Server then: SELECT CHARACTER_MAXIMUM_LENGTH FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'yourtablename' AND COLUMN_NAME = 'your column name'

        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