At 04:58 PM 6/1/2005, you wrote:
I'm having a brain freeze and can't seem to figure out why I can't insert a constant into a table using a column list.

Here is a simple query that inserts blanks instead of the constant.

insert into tmp (cust_id, custname) select cust_id, 'bob smith' from cust table

It inserts the cust_id but custname is is a blank (it is not null).

The select statement displays the cust_id and constant properly, so why won't it work with an Insert statement?
There is no syntax error and it executes without error.

TIA

Mike

Solved it. My ice-cap has melted. :)
The custname column was an ENUM (I thought it was a Char) and of course the constant I was trying to insert wasn't one of the allowed values so it replaces it with '' instead. D'uh.

Mike

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

Reply via email to