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

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

b+ tree
Hi
can every body help me about b+ tree ?(insert & delete)

Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag

PHP and MySQL Question/Help
I have a MySQL db with all my servers and all their details like server name, IP, OS, RAM etc etc 26

Online Event Ticket Sales
Has anyone wrote a script for online tickets sales?

I have been googling and found lots of th

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