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
Nel
NA
716
1.1m
Retrieving all rows from one table except those which have same values for the first column in the second table
Feb 23 2012 4:13 AM
Hello,
I have two tables. I want to select all rows from the first table, except those rows, which values are equal with the values in the first column of the secon table. The second table uses the values from the first table for its first column.
For example now with my incorrect select query I get:
GBR Garbr Nadvor P1 P2 P3 Pzd
1001 True False False False False
1001 False False False False False
1001 True False False False False
1001 True False True False False
1001 False False True True False
1001 True False False True False
1001 False True True False False
1001 False True True False False
1001 True False False True False
1001 True False False False True
1001 True False False False True
1001 True False False False True
1001 True False False True False
1001 True False False False False
1001 True False False False False
1001 True False False False False
1001 True False False False False
1001 True False False False False
1001 True False True False False
1001 True True False False False
1001 True False False True False
1001 True False False False False
1001 True False False False False
1001 1004 True False True False False
1001 1016 True False False False True
1001 1013 False False True False False
1002 True False False False False
1002 False False False False False
1002 True False False False False
1002 1004 True False True False False
1002 1016 True False False False True
1002 1013 False False True False False
1004 True False False False False
1004 False False False False False
1004 True False False False False
1004 True False True False False
1004 False False True True False
1004 True False False True False
1004 False True True False False
1004 False True True False False
1004 True False False True False
1004 True False False False True
1004 True False False False True
1004 True False False False True
1004 True False False True False
1004 True False False False False
1004 True False False False False
1004 True False False False False
1004 True False False False False
1004 True False False False False
1004 True False True False False
1004 True True False False False
1004 True False False True False
1004 True False False False False
1004 True False False False False
1004 1004 True False True False False
1004 1016 True False False False True
1004 1013 False False True False False
And I want 1001 to appear only once, as well as 1002, 1003, and 1004 shouldn't appear, since it occures in the second table, it can be seen in the second column.
Can anybody help me please?
Thanks in advance.
Reply
Answers (
4
)
What is the difference between Triggers and Cursors in sql ?
Select a driver being used for first time