In mysql puoi fare: SELECT ID, CAST(YourLongText as char(255)) AS YourVarchar FROM some_table Intendevi così