Hi, it seems that when there is an 'union' in a query it transforms the 'null' to '0' 
when the field is a number, and more over, I think the result is wrong...
I am using the 4.0.12 mysql server for Win32 in a Windows NT server.

this is the query...

select id, name from customer
union all
select null as id, name from customer

And... this is the result !!!
-----------------------
id      name
-----------------------
1       John Smith
2       Robert O Neill
3       Paul Mackenzie
0       Paul Mackenzie
0       Paul Mackenzie
0       Paul Mackenzie

If you want to test it, here are my table and records...

CREATE TABLE IF NOT EXISTS Customer (
        id INTEGER PRIMARY KEY AUTO_INCREMENT,
        name VARCHAR(50));
INSERT INTO Customer (name) VALUES ('John Smith');
INSERT INTO Customer (name) VALUES ('Robert O Neill');
INSERT INTO Customer (name) VALUES ('Paul Mackenzie');








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



Reply via email to