user287745
user287745

Reputation: 3171

How to select records not selected by inner select statement?

select pid from table where pid is not (select top 10 pid from table1)

What is the correct syntax for the above?

Upvotes: 1

Views: 77

Answers (2)

SqlACID
SqlACID

Reputation: 4014

select pid from table where pid not in (select top 10 pid from table1)

Upvotes: 2

Donnie
Donnie

Reputation: 46923

not in, instead of is not

Upvotes: 2

Related Questions