SQL condition on firstname and lastname without append or concat -


you have 2 tables customers , blacklist, both columns firstname , lastname.

how find customers? please note cannot append or concatenate lastname firstname(or vice versa) because of character limit.

i think left join work. please confirm.

select c.lastname,c.firstname curtomers c left join blacklist b on (c.lastname = b.lastname , c.firstname = b.lastname) b.firstname null , b.lastname null 

select    c.*      customer c not exists (   select  *      blacklist b     c.firstname = b.firstname     ,   c.lastname = b.lastname ) 

i assume you're inferring "good customer" 1 not in blacklist table? also, have no idea dbms you're using.


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -