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

mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i

I didnt code this but I need help with it
I'm sorry. i'm not a coder. I have this script for forcing download and previewing mp3. The guy that

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Just wondering what you think about my site
I am new to phpfreaks i just seen this form and thought it would be cool to see what other thought a

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

listcube issue
Hi
I have a virtual cube ZREMOTE. I use Tcode "listcube" to retrieve contents. I use of the

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

[PHP HELP] Php order form.
Hello to everyone @ phpfreaks. Im new to this site and hope to learn lots of things here.

Fir

Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it

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