Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Arrow Unanswered: how to reduce result's data length?

    I have some fields with longText datatype. Each record contain half a page of characters in just one field.

    I need only the first n characters of each record's longText field, not all of it.

    For example one field may contain 1500 characters. When I run a SELECT command I want database to send me only the first 100 characters of that field, not all of it.

    How can I do so by SQL commands on a mysql server?

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    have you tried the LEFT() function? | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts