* Rochester, Dean > I have a Mysql table with a char(2) column, name is Dependents. > I want the value that I insert to always be to places. I have tried > > Insert into Table1 Dependents values '02'; > > but it inserts 2 in the Dependents column
Really? It is not valid SQL... mysql> create table Dependents (test char(2)); Query OK, 0 rows affected (0.09 sec) mysql> Insert into Table1 Dependents values '02'; ERROR 1064: You have an error in your SQL syntax near 'Dependents values '02'' at line 1 mysql> Insert into Dependents values ('02'); Query OK, 1 row affected (0.03 sec) mysql> select * from Dependents; +------+ | test | +------+ | 02 | +------+ 1 row in set (0.02 sec) > How do I make it insert 02? I don't know what you did wrong... did you use quotes? You must use quotes, or it will be interpreted as a number, and 02 will be 'converted' to 2... -- Roger --------------------------------------------------------------------- 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