title: How to get a column length defined in the table schema in teradata
body: <p>I need to find difference between length of a column value with column length defined while creating table.</p>
  
  <p>Ex: I have a table schema as below.</p>
  
  <pre><code>CREATE TABLE `employee` (
    `id` int(10) NOT NULL,
    `name` varchar(10) DEFAULT NULL,
    `subject` varchar(10) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) 
  </code></pre>
  
  <p>with values</p>
  
  <pre><code>id  name    subject 
  1   Alex    maths   
  2   Bob     maths   
  3   Clark   science 
  4   Dave    maths   
  </code></pre>
  
  <p>Now I need the output as</p>
  
  <pre><code>id  name    subject len(name) remain_space 
  1   Alex    maths    4           6
  2   Bob     maths    3           7
  3   Clark   science  5           5
  4   Dave    maths    4           6
  </code></pre>
  
  <p>Here the remain space is calculated using the formula <strong>(10 - len(name))</strong> ,where 10 is the max.length of the column 'name' defined while creating table. How do I achieve this in Teradata?</p>