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

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

Regarding accessing SQL query issued by any user in Oracle 10g
Hi all,
i want to know the queries issued by various users accessing a database...

ME54/ME54N Conditional check for Release of PR
Hi Gurus,

My requirement is to put a check on the release of the PR with respect to the c

Validation
Hello

I know this is a really vag question.

I need to have a input field on a form th

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

Sql and php order list script problems
Hi im having a few problems with trying to get the coding right on a orders list ive done (or trying

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

Comparing MySql data and arrays.
I have a mysql table set up like this:
idsubjectbodyuseriddatetimetags1blog subjectblog body111|2

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

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