Quantcast
Channel: Creating view in mysql with union all but all records are being shown under 1 column - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Creating view in mysql with union all but all records are being shown under 1 column

$
0
0

I'm trying to create a view in MYSQL but when using Union ALL it is being shown underneath 1 column. when I try to add column names it simply says that the amount of columns and results dont match

use TestDB;DROP VIEW if exists auditTableView;Create view auditTableViewASselect usernames.username from usernames LEFT JOIN auditTable on usernames.ID = auditTable.userIDUnion ALLselect actionDesc.functionName from actionDesc LEFT JOIN auditTable on actionDesc.actionID = auditTable.actionIDUnion allSELECT timestamp from auditTable;SELECT * FROM auditTableView;

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images