How to get the size of a varchar[n] field in one SQL statement?

后端 未结 8 1582
自闭症患者
自闭症患者 2020-11-29 01:20

Suppose that I have a SQL table that has a varchar[1000] field called \"Remarks\".

I would like to craft a single SQL statement, which when executed, will return 100

8条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 01:37

    select column_name, data_type, character_maximum_length    
      from information_schema.columns  
     where table_name = 'myTable'
    

提交回复
热议问题