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:
Did you know?Explore Trending and Topic pages for more stories like this.
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

Warning: mysql_num_rows() supplied argument is not a valid MySQL result resource
This may be simple I just may need another pair of eyes..

When i get records back the below c

Does design fit in FPGA ?
Hi all,

I've made a large HCC-Design. Because of the program-size the compile process with th

Parse XML
Good day,

I use oempro software and try to parse XMLReturn but it's not working for me, simpl

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

Blocking video streaming
Hello everyone,

I post a message here because i didn't find any solution yet.
I just finis

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

PRotect my POST DATA... FROM HTML ATTACKS
I need to like let's say

If a user submit's his Prayer and he put's <meta refresh stuf

Newb advice
Hi all,

I'm a flash front end designer and I've taken on a project that needs some back end p

reading xml faster than DB call?
I am trying to optimize a high traffic website, and I enabled a feature where there are three photos

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