Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Sql :: how to find 2nd highest salary in a table 
Sql :: FIND LOWEST SALARY EARNER IN SQL 
Sql :: how to select all fieldsin a soql query 
Sql :: drush SQLSTATE[HY000] [2002] No such file or directory 
Sql :: mysql alter table add column 
Sql :: how to get max from each department in sql 
Sql :: run psql postgres docker 
Sql :: sql select whole row max column 
Sql :: Create the connection pool mysql2 
Sql :: query to find third highest salary 
Sql :: sql server update top n records 
Sql :: cast in sql 
Sql :: sql default constraint 
Sql :: sql and 
Sql :: count weekend days between two dates sql 
Sql :: like query 
Sql :: postgresql variable in query 
Sql :: oracle job class 
Sql :: minus equivalent in my sql 
Sql :: not keyword in sql 
Sql :: sql float 3 decimal places 
Sql :: mysql workbench 
Sql :: switch users mysql 
Sql :: Get a list of tables and the primary key 
Sql :: postgres drop all tables 
Sql :: one to one and one to many relationship 
Sql :: oracle undo usage per session 
Sql :: automatically update database last seen datetime in sql 
Sql :: mysql delet from the child table when we delete the rows from the parent 
Sql :: mysql stored procedure insert if not exists 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =