PDA

View Full Version : [ubuntu] Select String with fixed lenght



Black Mage
May 1st, 2009, 08:57 PM
Hey,

I was wondering how can I only get a certain amount of text in a field? Like I have a table with a TEXT field and I only want to get 100 characters out that TEXT field.

So what would be SQL for that?

SELECT sometext FROM table.

koenn
May 2nd, 2009, 01:44 PM
SELECT MID(column_name,start[,length]) FROM table_name

http://www.w3schools.com/sql/sql_func_mid.asp