Declare @MaxLengthInColumn
SELECT @MaxLengthInColumn=MAX(len(ColumName) ) from TableName
SELECT ColumnName+space( @MaxLengthInColumn - len(ColumName) ) FROM TableName
A Blog about Sql Server 2008.Easy to understand Sql Server Tips and Tutorials for beginners and useful sql server knowledge information for database developers.
No comments:
Post a Comment