mysql - sqlite query from list of value -
this code working within ms sql server
select distinct * (values ('1234'), ('5678'), ('8888')) table_staff_no(staff_no) staff_no not in ( select staff_no table_staff_no (staff_no in ('1234', '5678'. '8888'))
how should go in sqlite?
my table have value 1234, passing list (1234,5678,8888) check value not exist in table.
the result should show 5678, 8888.
translating query sqlite requires common table expression, available since sqlite 3.8.3:
with table_staff_no(staff_no) ( values ('1234'), ('5678'), ('8888') ) select distinct * table_staff_no staff_no not in ( select staff_no table_staff_no staff_no in ('1234', '5678', '8888'));
Comments
Post a Comment