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

Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric

reorder sql query
ok so i have this very simple code:
Code: $query = "SELECT search_keywords, COUNT(search_key

How to kill asynchronous postback / current postback?
Hi,here is my problem:I have a web site with many pages of which some may take time to process resul

Error querying database.
I get the above error when trying to insert some values to a datatable.
Here's the code :

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

need help about
i store the value of my select statement result to an array and stored it to a variable named $fname

Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this

('date' => '20

Adding Outlook 2007 items via file upload
I am looking for a way to be able to attach an Outlook item (an email message) in an ASP.NET 3.5 app

Unexpected T_Variable ?
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on

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