Quality is delighting customers
Tags:
Use alias/nested queries
Example :
Select a.employeename, b.departmentname from employee a, department b where a.departmentid = b.departmentid;
BTW, the question title is incorrect. We cannot retrieve anything without using "Select" ;)
Regards,
Arvi, QTPhelp.com
Check out some cool VB/QTP code sinppets here
Permalink Reply by neha bhardwaj on August 3, 2011 at 10:30pm @Arvi
question was How can we retrieve data from 2 tables without using "Joins" in mysql?
without using joins.
you mentioned in example the inner join.
is it true????
Permalink Reply by Samrat Jha. on August 4, 2011 at 5:23pm
Arvi,
It makes me laugh ... If I am not wrong, What you have used is indeed Join... but in 1st example you have written it in Theta style and in 2nd Example ( Which According to you is a join ) You have written the same query in ANSI Style..........!!
Thanks Samrat, my bad. Its more than 2 yrs since I wrote a query. I had written the queries using implicit and explicit joins. But, the point here is not about Theta / ANSI styles definately.
JFYI, I have provided the query to retrieve data from 2 tables without using joins in a response below.
Permalink Reply by neha bhardwaj on August 4, 2011 at 9:19pm
Permalink Reply by Hitesh Shah on December 2, 2011 at 1:49pm Hi Arvi,
I have idea about join but few doubts regarding this -
Inner join, euai join and Simple join is same? because oracle support simple join while SQL server ,MySQL support Inner join.
Please clear it .
Thanks
Hitesh
Permalink Reply by neha bhardwaj on August 4, 2011 at 7:24am :) yes ,i have a doubt you explained 2 example 1 with join and 1 without join.
but both are the inner joins.
on oracle we used symbol like for right join we used (+) operator.
but if we want same cmd in other database then we used "right join" keyword.so im confused at last it is a join that you used.
The result produced will be same as that of Join, but we have not used the "Join" keyword. You can probably say it is an implicit Join notation we have used, and this is the only way I know of to retrieve data from 2 tables without using the "Join" keyword.
Regards,
Arvi, QTPhelp.com
Permalink Reply by neha bhardwaj on August 4, 2011 at 4:41pm ok thanks a lot
by the way how much exp you have in testing???
Permalink Reply by neha bhardwaj on August 4, 2011 at 5:16pm :) g8t
© 2012 Created by Quality Testing.