mysql - sql - how to retrieve values which dont belong to a table -


so given me list of around 300 values (numbers). , need modify parameter of them. did basic query (example below) , found 270 300 given me. select count(*) table field in('1','2','3','4','5','6');

my question is, how can see values (in case 30 values) not present on table?

this live system shouldnt create there or change.

thanks in advance.

you can add table holding set. let's name set_table 1 column named set_key.

insert set table; this:

set_key ---- 1 2 ... 

now try this

select `set_key` `set_table` `set_key` not in (select value your_other_table 1); 

this should give keys in set not in table.

example:

your set (1,2,42)

your table contains values 1 , 2

the subselect select value your_other_table give 1 , 2. whole query this: selectset_keyfromset_tablewhereset_keynot in (1, 2); that'll give (42) result.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -