Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to get the maximum length of a name in sql

select * from (
     select top 1 City, LEN(City) City_Length from STATION order by City_Length ASC,City ASC) TblMin
   UNION
   select * from (
   select top 1 CITY, LEN(city) City_Length from STATION order by City_Length desc, City ASC) TblMax
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #maximum #length #sql
ADD COMMENT
Topic
Name
2+4 =