查询字段最长值.cmt 391 B

1234567
  1. <#@ template language="c#" HostSpecific="True" #>
  2. <#@ output extension= ".cs" #>
  3. <# TableHost host = (TableHost)(Host);host.Fieldlist.Sort(CodeCommon.CompareByintOrder);#>
  4. <# foreach (ColumnInfo c in host.Fieldlist) { #>
  5. select max(len([<#= c.ColumnName.ToString().ToLower() #>])) as len_<#= c.ColumnName.ToString().ToLower() #> from <#= host.GetModelClass(host.TableName) #>
  6. <# } #>