File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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
Mapping same POJO to two tables in Hibernate XML mapping files
Hypersonic DB question
How to create a tables having One to One relation ship to each other
Why sql exception happens?
How to restrict user against marking same event in multiple times
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015