[EMAIL PROTECTED] ("Jerry Jones") wrote in
news:[EMAIL PROTECTED]: 

> I am trying to do an update, where item numbers 1-9 get four 0's added
> to the front, 10-99 get three 0's etc.

mysql> HELP LPAD
Name: 'LPAD'
Description:
Syntax:
LPAD(str,len,padstr)

Returns the string str, left-padded with the string padstr to a length
of len characters. If str is longer than len, the return value is
shortened to len characters.

Examples:
mysql> SELECT LPAD('hi',4,'??');
        -> '??hi'
mysql> SELECT LPAD('hi',1,'??');
        -> 'h'

mysql>

-- 
felix

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to