| Author |
Creating a view combining two columns into one
|
Paul Kennerley
Greenhorn
Joined: Apr 24, 2005
Posts: 2
|
|
If I have two tables as shown below, could anyone tell me if and how its possible to create a view that has only one column that contains the dbName values from both the tutor and student tables? Thanks in advance CREATE TABLE tutor ( dbId INTEGER , dbName VARCHAR(20), dbEmail VARCHAR(20), dbPassword VARCHAR(8)NOT NULL ); CREATE TABLE student ( dbId INTEGER NOT NULL PRIMARY KEY, dbName VARCHAR(20), dbCourse VARCHAR(20), dbPassword VARCHAR(8) NOT NULL, dbPersonalTutorId INTEGER NOT NULL );
|
 |
Jon Egan
Ranch Hand
Joined: Mar 24, 2004
Posts: 83
|
|
Paul, Look into using two queries combined with UNION.... and check into the difference between UNION and UNION ALL, to be sure you use the right one. Hope this helps, -- Jon
|
 |
 |
|
|
subject: Creating a view combining two columns into one
|
|
|