Get the max length of Sql Server column using an array : I have four columns in my table namely Surname, FirstName, MiddleName, CurrAddress. Is there a way that I can store column names dynamically using an array and get the max length of each the field? Say for example out of the four fields I only need the Surname and FirstName maximum lengths. My code below will only display one column per transaction. Any help is greatly appreciated. Than you!

     ALTER PROCEDURE [dbo].[sp_getColumnLength]
     @colval nvarchar(50),
     @tblval nvarchar(50)
     AS
     BEGIN

     SELECT character_maximum_length as 'Max Length'
     FROM information_schema.columns
     WHERE column_name=@colval AND  table_name = @tblval

     END
     GO