Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the first 255 characters?  RSS feed

 
lu v thuan
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends!
I hava a column type containning more than 1000 characters in Oracle. I would like to get the first 255 characters in this column. Could any one pls tell me the way?
Thanks in advanced
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if column1 is 1000 characters and you only want 255:
select substr(column1, 1, 255) from table
Jamie
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!