MySQL Select Query - Get only first 10 characters of a value MySQL Select Query - Get only first 10 characters of a value mysql mysql

MySQL Select Query - Get only first 10 characters of a value


Using the below line

SELECT LEFT(subject , 10) FROM tbl 

MySQL Doc.


SELECT SUBSTRING(subject, 1, 10) FROM tbl


Have a look at either Left or Substring if you need to chop it up even more.

Google and the MySQL docs are a good place to start - you'll usually not get such a warm response if you've not even tried to help yourself before asking a question.