<p>Is it possible to obtain the maximum column length for a VARCHAR, CHAR etc?</p>

In pure T-SQL you can use this query:
```
```
select max_length from sys.columns as c inner join sys.objects o on c.object_id = o.object_id where o.name = 'myTable' and c.name = 'myColumn'
```
```
For linq-to-sql you need it rewrite into linq.