max_w1 Posted June 4, 2011 Share Posted June 4, 2011 SELECT customerNumber id, contactLastname name FROM customers UNION SELECT employeeNumber id,contactLastname name FROM employees the problem with the query is it eliminates the duplicate records, is there a way i can do this without eliminating? Link to comment https://forums.phpfreaks.com/topic/238404-mysql-union-without-eliminating-duplicate-records/ Share on other sites More sharing options...
requinix Posted June 4, 2011 Share Posted June 4, 2011 Use UNION ALL. Link to comment https://forums.phpfreaks.com/topic/238404-mysql-union-without-eliminating-duplicate-records/#findComment-1225178 Share on other sites More sharing options...
max_w1 Posted June 4, 2011 Author Share Posted June 4, 2011 Thanks it worked Link to comment https://forums.phpfreaks.com/topic/238404-mysql-union-without-eliminating-duplicate-records/#findComment-1225185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.