Form a inline view based on the results of the previous query?


Posted on 16th Feb 2014 07:03 pm by admin

Hi Experts,
Can we form a inline view on the results of a previous query (another inline view)?

Ex:
select employees.emp_no,
employees.ename,
departments.dept_no
from
(select dept_no from dept) departments,
(select emp_no, ename from emp) employees
where employees.dept_no = departments.dept_no

In the above example, first the compiler forms 2 inline views employees and departments and then joins these 2 in the where clause.

But can we form the "employees" inline view to have only those rows based on the results of "departments" query.

Thanks

No comments posted yet

Your Answer:

Login to answer
209 Like 16 Dislike
Previous forums Next forums
Other forums

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

Php If in MySql query (hiding labels if a field is empty)
Okay, I've been trying to do this for a while, and I'm finally going to ask for help so I can get th

php ajax - two drop down list with a submit button
i have created a form with 2 drop-down list and a submit button. I would like to know how to pass th

User input in to variable
Hi all,

I'm sure this is very easy but I'm having another brain freeze!

At the end of

simple php table loop
Hi all,

I've the following code

<?php // Create category options

Best way to check for end of a record and send it back to the first record
I'm hoping someone can help me out and explain the best way to accomplish this.

What I'm doin

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash