| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Thimble Smith | Date: | April 21 1999 12:46am |
| Subject: | Re: Is there a way to know if It's a number? | ||
| View as plain text | |||
On Tue, Apr 20, 1999 at 08:40:14PM -0500, Benjamin Scherrey wrote: > If its a numeric type your insert should fail for non-numeric > data [...] Nope. Try it out! tim@envy:~$ mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2055 to server version: 3.22.20a Type 'help' for help. mysql> create table foo (num int); Query OK, 0 rows affected (0.08 sec) mysql> insert into foo (num) values ('xyz'); Query OK, 1 row affected (0.01 sec) mysql> select * from foo; +------+ | num | +------+ | 0 | +------+ 1 row in set (0.00 sec) mysql> The magic of automatic type conversion. Tim
| Thread | ||
|---|---|---|
| • help! restoring | pete collins | 19 Apr |
| • Re: help! restoring | Christian Mack | 20 Apr |
| • Is there a way to know if It's a number? | Jochen Haeberle | 20 Apr |
| • Is there a way to know if It's a number? | Michael Widenius | 21 Apr |
| • Re: Is there a way to know if It's a number? | Paul DuBois | 21 Apr |
| • Re: Is there a way to know if It's a number? | Benjamin Scherrey | 21 Apr |
| • Re: Is there a way to know if It's a number? | Thimble Smith | 21 Apr |
| • Re: Is there a way to know if It's a number? | Fred Read | 21 Apr |
| • Re: Is there a way to know if It's a number? | Christopher R. Jones | 21 Apr |
| • Re: Is there a way to know if It's a number? | Graham Ashton | 22 Apr |
