- 0
sql SQL Query Help
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Distributed SQL: The architecture behind MariaDB Xpand — Free Whitepaper
By News Staff,
- ebook offer
- sponsored
- (and 4 more)
- 0 replies
- 4 views
-
- 0 replies
- 5 views
-
- 8 replies
- 1,913 views
-
Save 98% off this multi-course Premium Coding Skills Bundle
By News Staff,
- neowin deals
- online courses
- (and 12 more)
- 0 replies
- 4 views
-
This Premium Google Sheets & Microsoft Excel Certification Bundle is Price Dropped to $20
By News Staff,
- google sheets
- microsoft excel
- (and 9 more)
- 0 replies
- 1 view
-
Question
ZeroFearX
Hello,
I have a SQL question.
Let say that I have two tables.
id
--
1
2
3
sid id type
--- -- ------
1 1 1
2 2 1
3 3 1
4 1 2
5 2 2
6 1 3
I am trying to get returned t1.id, where t2.type = 1 and t2.type is not in ('2', '3')
From the example showed previously, only t1.id that would be returned is '3'.
Sorry for the bad explanation but I don't know how to explain it better.
Thanks for the heklpo
Link to comment
Share on other sites
2 answers to this question
Recommended Posts