I have never seen such a great explanation, so far I was very confused with EXISTS AND NOT EXISTS operators but after watching these video my doubts are cleared....thank you very much Guru Ji
thank you very much sir for making this video i have been struggling in subquery for many days but now my doubt is clear .this is the best video on subquery .
For those wondering why * has been used in the inner query, this is what I understood: for each row of the employee table we are comparing with all the rows of the department table by using(dept.eid = emp.eid), because it may be possible that a single employee is working in more than one department. In lecture 62 while using exists one mistake was using E_id in front of where which is not required while using WHERE and NOT WHERE. Other than that in lec 62, the query was correct, there we were not comparing one row of employee table with all row of project table because it was not required( at least one project) Hope this helps, also please reply if you think there is some mistake.
Sir apke video bhut strength deta hai interview crack karne k liye...🙏please please plsql ka v series baniye specially package , procedure , function likhne ka tricks dijiye... Please sir... 🙏
there are some mistakes in your syntex, but it's not a big problem... we just here to understand how it works. Thank you for your valuable videos🙏✨❣️🌸🙏✨❣️🌸
You repeated lots of same info but still failed to explain as to outer table will compare inner table with all rows regardless of if one match is already made or will it stop comparing once a match is made.
He told that if one is true then it will return true and for exist only one true is required so it terminates. It is as same as || in C++, it only checks if one of condition is true.
I really appreciate yr hardwork and I know it takes a lot to KEEP creating content for us irrespective of how many are actually subscribing and helping u grow too ❤
Thanks for the explanation. We can get the same result using joins as well. So what is the advantage, since the processing time for corelated or sync queries are more.
sir first of all thnq you so much for providing such type of amazing content , your teaching style is superb cant be described ,, i have a doubt select * from dept will also print complete details of department table i want to say that along with emp ,dept table details will also print i am correct ????? Am i right?
In operator ignores null values in that particular set and exists gives only boolean values either true or false hence scaning on data base is reduced and improves performance
Thank you sir...I have a doubt, in the example we have written solution as 'where exists' but in previous videos we used 'where e_id exists'. Both are correct??
@Pragati Gupta If * is used then all the attributes which are present in the outer query Are present in the resulting table with those attributes If specific attribute we need then Directly we can excess by presenting the attributes
Hi Varun Sir, in your code, " SELECT * FROM EMP WHERE EXISTS (SELECT * FROM Dept WHERE d.EID = e.EID); Why have we not put anything after WHERE? Like, could it not be "WHERE EID EXISTS (SELECT * FROM Dept WHERE d.EID = e.EID);"? PLEASE CLARIFY, SIR. "
A voice comes from the heart that thanks you so much sir ☺️🙏
Ur all videos make my journey easier to learn DBMS and SQL .I can confidently write in my resume about DBMS SQL .Thank you so much sir.🙏✨❣️🌸
placement mila ???
th-cam.com/video/5FsIa4Mp3ho/w-d-xo.html🙏🏻🙏🏻
@@GauravKumar-ok1ypyes Pooja work in my company
@@GauravKumar-ok1yp.,
sir u simply explain lot of tough concepts with ease and nice example.,highly humbled sir thanxx for teaching the way u teach...
Very useful topic sir nice explanation thank you sir
I have never seen such a great explanation, so far I was very confused with EXISTS AND NOT EXISTS operators but after watching these video my doubts are cleared....thank you very much Guru Ji
sir the way uah explained in minutely that is tremendous.
we can also use this simple subquery - SELECT * FROM Emp where Eid IN ( SELECT Eid FROM Dept )
right, but i have one question what if dept table consists multiple same e_id.
@@adnanbedsur just add distinct keyword in dept table
what a great person . love from Pakistan
Best way of explaining this correlated subquerywith exist that u gave sir.. 1 row of table 1 compared with all rows of table 2 ....🙏🙏🙏👏👏👏👏😍😍😍
No words to express my feelings...simply thxx aloott🙏
👏👏👏 So simplified. dhanyawad Bhai 👏
Gurujee shandar jabardast zindabaad
Thank you so much sir...i m on the right channel.....its quite easy to learn SQL..so now i m confident enough to apply for jobs
I was not aware of this correlated query. Thanks much Sir🙏 ❤
Great Explanations Sir...Thanks Very Much for nice explanation...
thank you very much sir for making this video i have been struggling in subquery for many days but now my doubt is clear .this is the best video on subquery .
Sir you explained co-related subqueries in a very accurate and brief manner. Thanks allot.
Thank you sir for support in DATA BASE
u r such a great person sir.
One of the Best Teachers in the world❤❤❤
For those wondering why * has been used in the inner query, this is what I understood:
for each row of the employee table we are comparing with all the rows of the department table by using(dept.eid = emp.eid), because it may be possible that a single employee is working in more than one department. In lecture 62 while using exists one mistake was using E_id in front of where which is not required while using WHERE and NOT WHERE. Other than that in lec 62, the query was correct, there we were not comparing one row of employee table with all row of project table because it was not required( at least one project)
Hope this helps, also please reply if you think there is some mistake.
instead * you can just use 1 there in nothing connection between result and select statement in nested query
As a sir said exist which used it comapre or scan whole eid coloum.... So no need to use*
Thank u so much sir for such a simple yet detailed explanation 👏
Great explanation sir..Thnkk u so much sir..Stay blessed..🙏🙏
Sir apke video bhut strength deta hai interview crack karne k liye...🙏please please plsql ka v series baniye specially package , procedure , function likhne ka tricks dijiye...
Please sir...
🙏
Thanku so much sir ❤️❤️❤️
Beautiful lecture on co related queries .. now concept is clear ❤️❤️❤️❤️
Nice video to understand correlated nested query..thanks sir.plz make more videos related to SQL queries
sir you got a new subscriber😇
appka dhanayavad sir ji🙏
Just one word. Amazing
3:19 video starts
thank you sir for giving great knowledge
Thanks for this video sir
Great video...Sir
Super Explanation
Khup chan sir
Thanks a lot bro.. I understood it.
Now I can decode complex correlated subqueries.🙏
there are some mistakes in your syntex, but it's not a big problem... we just here to understand how it works. Thank you for your valuable videos🙏✨❣️🌸🙏✨❣️🌸
What's the mistake ?
@@rahulshingne1963he also don't know what is mistake 😂
Nicely explained .. Thank you!
👍 thanks 😊
You repeated lots of same info but still failed to explain as to outer table will compare inner table with all rows regardless of if one match is already made or will it stop comparing once a match is made.
He told that if one is true then it will return true and for exist only one true is required so it terminates. It is as same as || in C++, it only checks if one of condition is true.
Agree...
Super explanation
Love from Afghanistan, thank u sir for ur great explanation 👍
love from canada
Very nice Mr. Mind hacker
It would be very helpful if the videos was in English so everybody could understand
Amazing
Great😊
great sir ...
great explanation boss: )
I really appreciate yr hardwork and I know it takes a lot to KEEP creating content for us irrespective of how many are actually subscribing and helping u grow too ❤
Mja aa gya
Super super
Thank you
Thanks for the explanation. We can get the same result using joins as well. So what is the advantage, since the processing time for corelated or sync queries are more.
sir first of all thnq you so much for providing such type of amazing content , your teaching style is superb cant be described ,,
i have a doubt
select * from dept will also print complete details of department table
i want to say that along with emp ,dept table details will also print
i am correct ?????
Am i right?
I had same doubt, and I think it should be Eid instead of *.
select *from dept will check whether the condition is true In this table sir is E_id as Primary Key and E_id frm department sir is using Foregin key
th-cam.com/video/5FsIa4Mp3ho/w-d-xo.html🙏🏻
Is Eid missing before exist in this query??plz clarify varun sir
Its been 1 continuous months hearing your voice in ×2...Now i can recognise you even in my sleep😅
Sir highly appreciate your efforts,I am new learner S when we have IN optrator which works same then why to use exits.
In operator ignores null values in that particular set and exists gives only boolean values either true or false hence scaning on data base is reduced and improves performance
Good bro
Thank You Sir.
sir kabhi link de bhi diya kro video mai bolke jokes apart thankyou so much for all the videos
Thank you sir...I have a doubt, in the example we have written solution as 'where exists' but in previous videos we used 'where e_id exists'. Both are correct??
No, in the previous video, there was a mistake.
Thanks sir
Sir bs aap ase hi help krte rho
Thankyou sir
Thank you
Thanku sir
I found an alternative solution for this question...
Select * from Emp where Eid In (Select Eid from Dept);
Will it be also applicable?
Ofc but he's talking abt correlated queries. Why'd he write a query with "in" here?
Nice
Hello Sir ! Can we write IN in place of EXISTS after WHERE clause ?
SUPERBBBBBB
Great video !
Can this query perform the same task yours
" Select * from Emp where Eid IN ( Select Eid from Dept) "
yes, it will give same result.
Sir ine doubt the question you mentioned in this video .. will it print the details of the inner query i.e. Dname or not
Sir plz uplod a class about RAID for DBMS
upload some videos about what type of questions will asked in gate 2020 in dbms
Go and check his channel... its already there
Sir Gate aur Net ke important questions karwa dijiye
What operator can we use instead of exist
sir difference between exist and IN . please.
Sir isme
select * from emp where Eid exits
Hoga na ?
Sir ye esa nhi hoga kya??👇
... Where eid exists (...
Sirf ...where exists (...
Kyo lagaya?
domain relation calculus pe vidios hai kya sir.
a doubt what if i ended up making my demo table which include emply detail n department in it ? on what basis one can say we had to make diff table.
Kindly clear my one doubt..
we have used * in inner query then also in output dept name is not printed..why?
Yes same doubt??
Anyone can reply plzz?
@Pragati Gupta
If * is used then all the attributes which are present in the outer query Are present in the resulting table with those attributes
If specific attribute we need then Directly we can excess by presenting the attributes
th-cam.com/video/5FsIa4Mp3ho/w-d-xo.html🙏🏻🙏🏻
arrange in order
Sir ye aap imagine kiye leki employee table me hi all colum exist kare tab Hume department table ki koi jarurat nahi fir kaise kare sir
Sir u don't have written Eid before using Exists
The right ans is
SELECT * FROM EMP WHERE EID EXISTS(SELECT EID FEOM DEPT WHERE EMP.EID = DEPT EID);
I also thought that
Yes
Yes
th-cam.com/video/5FsIa4Mp3ho/w-d-xo.html🙏🏻🙏🏻🙏🏻
But if I want the dept name as well so what would be query for this in correlated subquery
So what's the difference between in and exists?
In inner query' select eid 'should be there know sir...
Sir if I want to include Department name also in details of employee than what will be the query ?
And if we want department name also
Then what will be the Qry?
can we use in instea of exists?
Hello Sir,
I have a query if we need to print Eid, Name, Address and Dname, then is it possible to edit and get it via this query itself?
With using table alias and using alias for department table you can modify your query.
In inner query there is select* . what will it print?
Sir kya Inner Query mein * Ki jagah Eid likh skte hain
Evaluate this
😀💯
Sir , what is the independent sub query??
when gate smashers is there
there is no failing chance in college exams
Hi Varun Sir,
in your code,
"
SELECT * FROM EMP
WHERE EXISTS (SELECT * FROM Dept WHERE d.EID = e.EID);
Why have we not put anything after WHERE?
Like, could it not be "WHERE EID EXISTS (SELECT * FROM Dept WHERE d.EID = e.EID);"?
PLEASE CLARIFY, SIR.
"
1st query is correct... 2nd query is wrong bcoz of syntax
@@vijyalaxmiwadle6317 in previous video sir wrote as WHERE Eid thats why i had a doubt can you clarify
Sir ek question hai ... previous exits
ot exits video Mai select Eid from emp where eid exits tha but isme where k baad eid kyu nhi likha gya ?
typo. there will be eid before exist