A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Creating a view combining two columns into one
Joined: Apr 24, 2005
Apr 04, 2006 18:33:00
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 ,
dbPassword VARCHAR(8)NOT NULL
CREATE TABLE student
dbId INTEGER NOT NULL PRIMARY KEY,
dbPassword VARCHAR(8) NOT NULL,
dbPersonalTutorId INTEGER NOT NULL
Joined: Mar 24, 2004
Apr 04, 2006 22:38:00
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,
I agree. Here's the link:
subject: Creating a view combining two columns into one
How to restrict user against marking same event in multiple times
Hypersonic DB question
Why sql exception happens?
Mapping same POJO to two tables in Hibernate XML mapping files
How to create a tables having One to One relation ship to each other
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014