S NOT EXISTS
:
select t.* from tablename t
where t.vendorid is not null
or not exists (
select 1 from tablename
where itemid = t.itemid and vendorid is not null
)
Podívejte se na ukázku
.
S NOT EXISTS
:
select t.* from tablename t
where t.vendorid is not null
or not exists (
select 1 from tablename
where itemid = t.itemid and vendorid is not null
)
Podívejte se na ukázku
.