MySQL Forums
Forum List  »  Newbie

Can select return specific number of chars?
Posted by: llandyjunk
Date: May 17, 2005 10:21PM

I was creating a dropdown list and was going to populate it with the first 5 chars of a series of characters pulled from a database, and I was thinking it would make it much faster if I could just get the first 5 chars of the column from the database than to get the full value, then cut off the rest of the characters. For example, I have a column that has values like E0B32-23, etc etc (and all of them are in this same format), and I only want the chars before the dash returned from the select query. Is there a way to do this with select?

Options: ReplyQuote


Subject
Written By
Posted
Can select return specific number of chars?
May 17, 2005 10:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.