TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Shreyas Tg
NA
18
6.5k
sql query execution using exists and IN
Oct 30 2015 1:37 AM
SELECT * FROM FAMILY_DETAILS WHERE EXISTS(SELECT EMPLOYEE_ID FROM EMPLOYEE_MASTER WHERE EMPLOYEE_ID='EMP001')
SELECT * FROM FAMILY_DETAILS WHERE EMPLOYEE_ID IN(SELECT EMPLOYEE_ID FROM EMPLOYEE_MASTER WHERE EMPLOYEE_ID='EMP001')
I have these two queries in sql server 2008 R2. Both will give same results. Actually from these above queries output is only two rows, But in case if i have large number of records in that scenario Which one is better to use? and why?
Reply
Answers (
3
)
How to design a Calender table in Sql Server 2008 R2
Sql server