At 01:01 PM 7/15/2002, David yahoo wrote:
>how to retrieve the 2 last char of a string stored in db ? :
>
>SELECT LENGTH(db) as len , SUBSTRING(db from len-2 ) from nlconfig;
>
>NOT WORK .....!
>
>In php by example, there is a substr with a negative pos that give char at
>end ! no in mysql !

select right(db,2) from nlconfig;

-jsd-



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to